A side wins the game by scoring six hoop points for each ball and then hitting the peg with both balls. This is usually done in the same turn during a croquet stroke and the continuation stroke. Ideally you take croquet from your partner ball near the peg. Line the balls up so that in the croquet stroke the partner ball hits the peg, then in the continuation shot the strikers ball hits the peg.
However you can also win the game by hitting the peg with each ball in two separate turns. For example in one turn you strike red and it hits the peg. In a subsequent turn you strike yellow and that hits the peg. You win if you complete these shots before your opponent hits the peg with both of his balls.
A ball that hits the peg and has scored the six hoop points in order scores a peg point and is removed from the lawn immediately.