An anal abscess is an infected cavity filled with pus found near the anus or rectum. Ninety percent of abscesses are the result of an acute infection in the internal glands of the anus. Occasionally, bacteria, fecal material or foreign matter can clog an anal gland and tunnel into the tissue around the anus or rectum, where it may then collect in a cavity called an abscess. An anal fistula also commonly called fistula-in-ano is frequently the result of a previous or current anal abscess. Normal anatomy includes small glands just inside the anus. The fistula is the tunnel that forms under the skin and connects the clogged infected glands to an abscess.
Anal gland - Wikipedia
You probably are because swollen, infected anal glands are pretty common in dogs. Dogs have a pair of small glands on either side of the anus, just under the tail. These glands also called sacs contain a smelly, oily fluid that smells a lot like skunk. Normally, when your dog poops, some of the liquid gets squeezed out of the glands as a result of pressure in the colon.
The anus is that part of the intestinal tract that passes through the muscular canal of the pelvis and anal sphincters. It is the final orifice through which stool passes out of the body. In adults, the anus is 4 to 5 centimeters long. The lower half of the anal canal has sensitive nerve endings.
An anal, or rectal, abscess occurs when a cavity in the anus becomes filled with pus. It causes extreme pain, fatigue , rectal discharge, and fever. In some cases, anal abscesses can result in painful anal fistulas.