Sometimes an anorectal abscess needs to be surgically opened and drained. This relieves pain and swelling.