In cancer diagnosis, formalin plays a critical role in the preservation of biopsy specimens. When a tissue sample is taken from a patient, it is often placed in formalin to prevent decay and to maintain the structural integrity of the cells. This process is crucial for accurate histopathological examination, which helps in identifying the presence and type of cancer.