Perianal abscesses can occur when the tiny anal glands that open on the inside of the anus become blocked, and the bacteria always present in these glands cause an infection. When pus develops, an abscess forms. Treatment includes draining the abscess, usually under local anesthesia in the doctor’s office.