In histology, the TNM system is used to analyze tissue samples. Histopathologists examine biopsies or surgically removed tissues to determine the tumor's size, invasion depth, lymph node involvement, and presence of distant metastasis. This information is then translated into the TNM staging.