Your cohorts pool of external marks are divided evenly across the group based on rankings and spacings, from the rank your school sent to the board of studies. The mark you get is an average of the external mark you score after it has been scaled with the internal mark given to you based on ranking.
I think this is how it works.
That's correct, but in simpler terms:
Your assessments throughout the year up to your trials give you your rankings for your subjects.
After the trials, these rankings are sent into the Board of Studies.
When you sit your HSC exam, your mark you get in this exam is scaled (according to how well you went and the difficulty of the subject) and then given to you as an 'Exam Mark', out of 100.
When your cohort sits the exam, the total amount of marks that they all receive are scaled based on how well some went (this is a complex algorithm that is a Holy Grail among teachers and students everywhere) and then this total amount of scaled marks is redistributed amongst your grade based upon the ranking that they received throughout the year. This mark is called the 'Assessment Mark' and is a mark out of 100 as well.
Also, you should note that the marks that get redistributed are done so in between the top and bottom Exam Mark. So, if the top Exam mark in a subject is 90 and the bottom is 60, all the Assessment marks will lie in between. If the top exam mark is 90 and the bottom is 75, therefore everyone will receive assessment marks between 90 and 75, which is better for everyone.
The Assessment Mark and Exam Mark are then averaged to give you the HSC Mark for that particular subject.
And to answer your question, the HSC Mark is the one that determines your overall 'Band', so if I got a 90 exam mark and a 70 assessment mark for a subject, despite achieving to a band 6 level on the day of the final exam, I performed poorly in my cohort throughout the year, which gave me a poorer rank, which gave me a poorer assessment mark and a HSC Mark of 80 [(90+70)/2)], a band 5.