From Wikipedia:
Cold milk is the most effective solution against the burning sensation (due to casein having a detergent effect on capsaicin[20]) and cold sugar solution (10%) at 20°C/68°F is almost as effective.[21]
To expand on the “detergent effect”, I found another person’s explanation via Google search that is good:
Milk contains casein, a lipophilic protein that surrounds and washes away the fatty capsaicin molecules(which cause the ‘burn’) in much the same way that soap washes away grease. A nice heavy beer will do the trick too, to a lesser extent.