Each voter gets two votes - a first and second preference
There are two rounds of counting
In the first round, the first-preference votes are counted. If no candidate gets 50% of the first-preference votes, then a second round of counting begins
In the second round, all candidates apart from the leading two are eliminated. The second-preference votes for the eliminated candidates then transferred to the candidates still left in