Glands near the anus can become blocked. This can lead to infection. If the infection can't drain, a collection of pus called an abscess may form. Symptoms of an abscess include anal or rectal pain, itching, swelling, and fever. Frequently the abscess results in a fistula, which is an abnormal connection between the abscess and the skin where pus drains. A fistula may sometimes be seen on exam and may need other testing and treatments.
Your doctor will likely drain the abscess. In some cases, they will also prescribe antibiotics. People with artificial valves, diabetes, weak immune systems, and certain other conditions always need antibiotics.