What is the cause of pain in the ear with swelling and pain?

Pain in the ear and visible swelling and pain, if there is no significant hearing loss, pus in the ear, possibly otitis externa due to bacterial infection of the external ear canal.