Exams are hosted at the end of all the classes. You will start an exam when you attend the class after the last content class. Exams have a configurable attempt amount, currently set to 3 as of this documentation. Exams are not like content classes in that they can only be sat one time. If you do not finish in 45 minute, or if you log off, you are given a grade based on what you did finish. You are allowed to take it more than 1 time.
Exams are also different in that they are different each time. An Exam is setup with questions and spells and potions taught throughout the year, and the user will be given a portion of them as the exam. Which ones are selected are random and higher years are expected to contain some content from lower years.