Ki67 is detected using immunohistochemistry (IHC), a technique that involves staining tissue sections with antibodies specific to the Ki67 protein. The stained sections are then examined under a microscope to evaluate the extent of Ki67 expression. The percentage of Ki67-positive cells is often quantified to provide a proliferation index, which can be used for diagnostic and prognostic purposes.