The TUNEL assay operates on the principle of labeling the fragmented DNA of apoptotic cells. The enzyme terminal deoxynucleotidyl transferase (TdT) is used to add labeled dUTPs to the 3' ends of the DNA breaks. These labeled nucleotides can be detected using various methods, such as fluorescence or light microscopy. This method allows researchers to quantify and visualize apoptotic cells in tissue sections or cell preparations.