Okay, so, basically throughout the year, you do school assessment tasks for each of your subjects. These, on their individual weighting, determine your final rank in your individual subject. Let's have a recurring example, let's say Physics. Say throughout the year, you do well and achieve a final ranking of 10/60. On the final exam, you sit the Physics paper. Hypothetically, suppose you got 77/100 when it was marked by the Board of Studies. This mark gets changed into a Total Weighted Mark (TWM) which is a mark out of 100 (or whatever the raw exam is out of, eg. in Mathematics, the TWM is out of 120) that incorporates option questions, various texts studied (such as for English) and other varying factors among subjects. (That is, for English, it takes into account the fact that some modules are harder and thus a 13/20 in one module may be equivalent to a 16/20 in another - this difficulty scale is determined by the Board of Studies after much deliberation).
So in Physics, suppose you studied a difficult option topic and achieved 17/25. This means, that for the other 75 marks of the paper, you scored 60. Those 60 marks are the same as 60 Total Weighted Marks, as they are constant throughout the state. The difficult option, for example, may be worth a 21/25 when compared relatively to the other options. So, despite your raw mark being 77/100, your TWM is 81/100.
This Total Weighted Mark is aligned by the Board of Studies, based upon the difficulty of the paper (determined by the state's results as a whole). Using the raw mark database in my signature, I can deduce that a TWM of 81/100 in Physics is roughly equal to an exam mark of 92. Bear in mind, the actual conversions vary from year to year as the difficulty of the paper varies. Furthermore, bear in mind that nobody actually knows the algorithm to determine each subject's aligning - it is a well kept secret by the Board of Studies.
So, you've got an exam mark of 92. This is kept by you, nobody obtains it, nobody modifies it - it is a mark that you earnt in the HSC Exam for Physics.
Once your cohort sits the Physics exam, every student's marks are aligned like yours was. The total sum of them is sent into the Board of Studies, and, essentially, the Board looks at your rank, they look at the total amount of marks, and allocate a certain percentage of the pool of marks to you based upon your ranking. Do note that the
highest ranked student will receive the highest exam mark, be it their own or not, as their assessment mark. Similarly, the lowest ranked student will receive the lowest exam mark, be it their own or not, as their assessment mark. So, you were ranked 10/60 in Physics. Suppose your assessment mark is 90.
Thus, your HSC Mark is an average of the two, so HSC Mark = 182/2 = 91.
You scored a HSC Mark of 91 for Physics.
This process is done for all of your subjects, with slight modifications for one unit subjects and whatnot.
Then, once you have a full set of HSC Marks, you get them sent to you mid-December.
If you have 10 or more units, UAC then scales each subject's HSC Mark into a new mark, often dubbed an 'ATAR Equivalent'. This is done so by taking into account the difficulty of the subject, and the difficulty in which UAC deems the mark you obtained to be received. The ATAR Equivalent is a mark out of 99.95.
NOTE: There is a much more complicated method to UAC's Scaling, involving aggregates and scaled marks and whatnot. This is a simplified version. Feel free to correct me.
Then, once each subject has an ATAR Equivalent, the ATAR equivalents are averaged (where your best 10 units of ATAR equivalents count) and you are given an ATAR accordingly.