I'm not a doctor, but I do have a minor in audiology and spend a great deal of time testing hearing and looking at the inner ear. The past few months I've had a serious head cold and burst my eardrums just by coughing 3 times and I know I can't get in the water.
Past of the problems that can be presented with inner and outer ear infections include:
Outer ear, can become blocked and any increased pressure in a blockage can cause perforation, small or large. Not to mention the hearing impairment (though with a blockage it is usually temporary) that goes along with blockages.
Inner ear: Constant and or re-occurring infections can cause scaring on the tympanic membrane (ear drum) and other inner ear structures, this leads to permanent hearing loss and can be quite uncomfortable. The inner ear is a structure of bones and tissues and hair, there is a tube in the back that in adults drains down into the throat. This is the tube that is associated with many childhood infections, usually needing "tubes" inserted into the ear drum to provide drainage. As we get older our tubes dip more downwards towards out throat.
With that said, an infection can get so severe that it can travel to the throat, (very uncomfortable) or it can even travel to the brain causing a severe infection, that infection can be fatal if not treated immediately.
So, that wasn't to scare anyone, most ear infections are minor to moderate and brain infections caused by them is very rare, but it can happen.
At my LDS they have ear plugs that prevent water from entering the canal, they do allow for hearing though which we know is important.
Remember: Don't use q-tips to clean the ear, it can perforate the tympanic membrane or it can cause a blockage of ear wax or whatever else might be in there. And, do try and keep the cavity dry when out of water.
Other than that, I hope the information helps and Safe Diving all!