You can use any 'neutral' subject - one that is known to have equal amounts of red, green and blue in it. The camera then analyses that image and sets the white balance so that red, green and blue are exactly equal. If you have a colour histogram option, you will see all colours adjusted to the same level. In this way, all other colours in the picture will come out accurately.
The main advantage of using a white target is that there are quite often neutral white targets around so you don't need to carry a card specifically. I used a table cloth the other day, which I think is popular with wedding photographers.