A patch test is a diagnostic tool used to identify allergens responsible for causing contact dermatitis. It involves applying small amounts of various substances to the skin, usually on the back, using adhesive patches. The skin's reaction to these substances helps in identifying allergens, which can then be avoided by the patient.