The cause for the pain from spicy food is often something called capsaicin.
Capsaicin is not soluble in water, and drinking water just spreads it through your mouth further. Instead it's soluble in fat and fat-based lotions.
What you want to do accordingly is drink milk, eat yogurt or similar fat-based foods to ease the pain.