Acid rain is formed when nitrogen dioxide, or sulfur dioxide, both produced by burning fossil fuels, reacts with water in the atmosphere to produce rain with a pH value below 5.