CD31 detection in tissue samples is performed using immunohistochemical techniques. Specific antibodies targeting CD31 are applied to tissue sections, which are then visualized using chromogenic or fluorescent detection methods. The presence of CD31 can be observed under a microscope, highlighting endothelial cells and vascular structures within the tissue.