An anal fistula is a tunnel that runs from inside the anus the hole your body uses to get rid of solid waste to somewhere in the skin around it. It usually follows an infection that didn’t heal the right way.
Just inside your anus are several glands that make fluid. Sometimes, they get blocked or clogged. When that happens, a bacteria buildup can create a swollen pocket of infected tissue and liquid. Doctors call this an abscess. If you don’t treat the abscess, it’ll grow. Eventually, it’ll make its way to the outside and punch a hole in the skin somewhere near your anus so the gunk inside it can drain. The fistula is the tunnel that connects the gland to that opening.