Patch testing is a diagnostic tool used to identify specific allergens responsible for causing allergic contact dermatitis. It involves applying small amounts of potential allergens to the skin under patches and observing for reactions over a period of days to determine sensitivity to particular substances.