Like other birds, swans clean themselves very frequently, using oil from a gland above their tails. In waterbirds this gland is extra large. As 5029 says, the oil makes the feathers waterproof, so the water does not actually touch the feathers themselves.
In fact if you look carefully, you'll see that their necks (which spend more time under the water) are usually slightly yellowish.