Yes, swimmer's ear is an infection, specifically an infection of the outer ear canal (also known as otitis externa). The infection is often caused by bacteria or fungi that thrive in a moist environment, such as when water remains trapped in the ear after swimming. It can also occur due to irritation from objects like cotton swabs or earplugs.
Sources: