The ear has a self-cleansing mechanism and clearing of wax with cotton-tips or any tools is unnecessary. Ear wax also has anti-bacteria properties that help to prevent ear infection.
If you swim regularly, it is important to make sure the ears are dried after a swim. Turning the head and gently pulling the ear in different directions helps to drain the water out of the ear.
Gentle use of cotton-tips may be necessary but it is not advisable to vigorously clean the ear. Ear plugs can be used to prevent water from getting into the external ear canal.
You can also prevent water from entering the ear canal in the shower by plugging the outside ear with a piece of cotton wool that is slightly soaked with baby oil.