Cold water swimming: what is the safest way to do it?

Taking a plunge in cold water is increasingly popular, but what's the safest way to enjoy it?