((Either theory or in-thread would be good))
((Not sure if this is what you wanted, but meh...))
Suppose we have four candidates in an election; red, blue, green and orange.
Each voter gets a first preference vote and a second preference vote.
The first 5 votes are as follows: (1st/2nd)
Red/Green
Red/Blue
Orange/-
Blue/Green
Red/Blue
Red would win in this instance as he has 3 1st preference votes out of the 5 available (ie a majority)
The next two votes are as follows:
No candidate has a majority of first preferences, the leader being Red with 3 out of the 7 1st preference votes cast. Blue is the runner up with 2 1st preferences. The other candidates, Green and Orange, with only 1 first preference each are therefore discounted.
The second preference votes are added to the first preference votes for the two remaining candidates.
Red now has three votes in total (3 1st + 0 2nd)
Blue now has five votes in total (2 1st + 3 2nd)
Blue would win in this instance with the most votes in total.
((I'm not too sure that has actually clarified anything...))