By now it's a bit late to get the heat out, but you are right: for the next time, that's the first thing to do. Ice isn't necessarily the best option, though; immersing the burnt area in water or keeping it under running water for at least a quarter hour takes care of the heat without running a risk of frostbite. The water doesn't have to be ice cold, either -- anything up to lukewarm works.
Treating the burn afterwards, the main thing is to protect the area so that it can heal. If you dress it yourself, use a bandage intended for burns, as regular ones may stick to the skin, irritate it and rip it open. This too is mainly advice for the future, though: I agree with the others that this would be a really good time to see a doctor.
Ouch.
Nfr