Swimmer's ear occurs when water gets trapped in the ear canal.. sometimes from wax, sometimes from a bone spur or funny-shaped canal.
The water softens the skin and alters the normal pH of the skin, allowing bacteria or fungi normally present in the ear canal to invade the skin and soft tissues. this represents a local infection in a very sensitive spot, and hurts like crazy in many cases.
Once you've got it, see a doc and get treatment.
Preventive measures that are commonly used and work well for most ears include a mix of 50% white vinegar and 50% rubbing alcohol (70%isopropyl alcohol in water)
Use five or so drops of that solution in each ear after each dive.
If recurrent ear wax is a problem, first get the wax cleared out and the ear canal and drum inspected by a doctor.
ear wax recurrence can be prevented by using either light mineral oil or olive oil five to ten drops in the ear, then lie down for thirty minutes or so with that ear up so the oil runs down into the ear canal ansd softens and dissolves the wax. Many people choose to do this at bedtime and then sleep with a towel on the pillow to catch the oil and wax as it runs out during the night.
Do that procedure in each ear every week or two and it will prevent recurrence of large amounts of ear wax.
Between the postdive drops above and the ear wax control technique, this prevents the two most common external ear problems for most people.
If you've had previous eardrum perforations or surgeries, check with your doc before using these, but they are usable preventives for most otherwise healthy ears.
This won't affect middle ear problems or squeeze. Since in your case, you have symptoms of an ear problem, but we don't know what it's from, have your doc take a look to get precise advice.
Print this if you want and take it along on the visit.
Many docs will be familiar with these techniques, but sometimes they're not.
If your doc has a better technique or another trick, post it and let us know.
Dive safe and painless;
John Reinertson