Patch testing is a diagnostic tool used to identify specific allergens that cause contact dermatitis. It involves applying small amounts of various substances to the skin under occlusive patches. The patches are typically left in place for 48 hours, after which the skin is evaluated for any reactions. This method helps in identifying allergens that patients might come into contact with in their daily lives.