The KOH (potassium hydroxide) test is a diagnostic procedure used to detect fungal infections on the skin, hair, or nails. It involves applying a 10-20% KOH solution to a sample of the affected area and examining it under a microscope. The KOH dissolves keratin, allowing for easier visualization of any fungal elements.