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. Fistula is a tunnel that connects a clogged gland inside the anal canal to the outside skin.
The anal glands or anal sacs are small glands near the anus in many mammals , including dogs  and cats. They are paired sacs on either side of the anus between the external and internal sphincter muscles. Sebaceous glands within the lining secrete a liquid that is used for identification of members within a species.
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. There are blood vessels under the lining, and in its mid portion there are numerous tiny, anal glands.