You keep all of your studies in total with the best score being used if you repeated a study. However, only 4 subjects count fully towards your atar and 2 more contribute to 10%, so if you do more than 6 subjects in total, then the rest won't count for anything.
Picture this scenario:
2011: English [30], Methods [30], Specialist [30], Chemistry [30], Physics [30]
2012: English [25], Methods [35], Specialist [20], Biology [25], Psychology [30]
The subjects which will count will be:
English [30], Methods [35], Specialist [30], Chemistry [30], Physics [30], Biology [25], Psychology [30].
Note that you keep all studies that you performed in total, but if you repeated a subject, then you only keep the best score of that subject, since you can't have the same subject twice.
However, only 6 can count towards your aggregate, so in that case, biology would probably not be included.