When the scoring is described as 2 and 1 it means that the winner of the game locked in their victory before the 18th hole.
The first number tells you how many holes ahead the winner is, and the second number tells you how many holes are left to play.
In this particular example, 2 and 1, the winner is two holes ahead, and there's one hole left to play (in other words, the game was won at the 17th hole).
If you were to see 3 and 2 it would mean that the winner is 3 holes ahead with 2 holes left to play (the winner clinched the victory on the 16th hole).
On September 30, 2012, Rory McIlroy made a 2 and 1 win over Keegan Bradley at the Ryder Cup.