The toilet flange, also known as the closet flange, is the connecting piece between the plumbing drainage and your toilet. This piece ensures that water exiting the toilet is fully transferred through the bottom of the toilet and out through the drainage system in your bathroom. While this piece is mainly for drainage, it also functions as a stabilizer for the toilet, to keep it held in place tightly and to avoid rocking or tilting.
This piece interacts closest with the trap, wax rings, closet bends, and internal plumbing pipes. These pipes are usually metal (copper, steel, brass), but can also be made from PVC pipe. The flange can break or wear down, but thankfully, the repair cost (depending on the damage) is only around $60-200. The project can usually be completed without a professional plumber, and the part is pretty hardy, meaning it usually requires minimal repairs.