Infections of the outer ear, pinna and ear canal are commonplace. People who swim frequently or for long periods are particularly prone. Dirty water, chlorine and soap can all soften and irritate the ear canals, causing inflammation and infection. Itching is an early sign. Unfortunately it tends to encourage dirty fingers, sharp fingernails and pen lids to be poked into the ear canal to scratch it. This causes trauma to the softened, friable skin. This perpetuates and worsens the infection and inflammation.
If your ears are sore try to avoid scratching them. Prevent swimmer's ear by wearing molded ear plugs such as these to keep the water out of your ears. They can be connected on a cord and tied to your wetsuit so you don't lose them.
Psoriasis and eczema of the ear canals are common causes of repeated ear infections. They can cause breaks in the protective dermis, allowing bugs in. Seek appropriate treatment from your GP. You might need some steroid cream or ointment.
Always rinse your ears with clean drinking water after immersion. High percentage alcohol is also great for killing germs in your ears after being in the sea. This is particularly relevant if you have been in the warm waters of the tropics where it is more important to wear ear protection.