Basically every year they look at the exam and the overall marks to determine how difficult the test was in comparison to other years. The then look at the band descriptors for the subject, which are basically written explanations of what a student in each band level should be capable of. From this, it is determined what marks are needed to qualify for each band to account for the fact that different exams can be harder or easier (this is especially prevalent in things like maths, where some exams are really hard and so the average marks are low, despite the cohort being just as smart as normal). Then they align your marks according to this (these are the marks nesa gives you) to create some consistency across how difficult it is to get a certain mark across years in the same subject.
Then, UAC gets your marks and scales them. This is when they compare marks across subjects to work out how 'difficult' it is to get a certain mark in each subject. This is what determines your atar. Each subject has a different atar contribution, so in something like extension 2 maths an aligned mark of 90 will have an atar contribution of like 99. In an 'easier' subject, a mark of 90 may have a lower atar contribution. This is bc the alignment process only works out your marks relative to the band descriptors for that specific subject. The scaling process is how they compare subjects to get an atar. Marks/bands across different subjects are not comparable, nor will they contribute to your atar in the same way, because the band descriptors differ across subjects.
In terms of how it differs each year, if the exam is harder than normal (i.e. people get lower marks overall), the raw mark needed for a band 6 will be lower to account for the increased difficulty. If the exam is easier than normal, your raw mark would have to be higher for a band 6. Regardless, the scaling process will compare how students do in different subjects to work out a comparison between subjects. So its not really easier or harder to get a band 6 or a specific atar in different years. And the atar is just a rank in comparison to the rest of nsw, so even if everyone's marks were for some reason higher than normal, the atars would not change as it is all just a comparison with how everyone else goes.