At the outermost part of the ass are two sphincter muscles, an outer one and an inner one.
The sphincter muscles surround the anal opening and can be relaxed and contracted. If you want to receive something up the ass for anal sex, it’s vital that both sphincter muscles are relaxed in order to enjoy it and avoid injury. The outer sphincter muscle can be controlled, which means you decide how you want to use it. However, the inner sphincter muscle cannot be controlled but reacts to pressure, whether that pressure is coming internally or externally. When, for instance, you push a finger, a cock or a dildo carefully onto the inner sphincter muscle it initially contracts, but after a short period (about 15 seconds) it relaxes.
Just inside the anal opening is the rectum, which curves slightly backward toward the back, with a depth of about 6 inches/15 centimeters before it becomes the large intestine. There is another sphincter muscle in-between the rectum and the large intestine, which helps keep feces out of the rectum until you need to take a dump.
A thin and sensitive mucous membrane lines the inside of the ass. This anal membrane is far more sensitive than that found in the vagina. The type of mucous membrane in the ass is one that absorbs moisture, which makes the ass particularly vulnerable to HIV and STIs. The mucous membrane in the ass does not produce its own lubrication, so if you’re having penetrative anal sex it’s important to use plenty of lube, both to make it nicer and to help prevent injury to the mucous membrane lining.