iPhone, liquid ingress, water damage checklist
Before anything else, the very first thing you absolutely must do with an iPhone that has been exposed to liquids/water is get the battery disconnected. If you cannot get in to the iPhone to disconnect the battery, then the next best option is to do a full shutdown ( hold power button down until the power off slider appears, then slide to shut down ).
Note: the iPhone 4/4S are the easiest to access the battery on. iPhone 3/3GS/5 units require the use of a suction cup and a spudger, along with a bit of delicate skill to prise open without damaging, as such, for the 3/3GS/5 variants I recommend seeking out a professional instead to perform the task.
With liquid damage, the biggest cause of damage to your phone is delaying. If you cannot open your phone to disconnect the battery, then immediately find someone who can, even if it costs $50, it's a lot cheaper than losing your phone to corrosion. Have yourself an emergency kit handy in case it ever happens. You will need a pentalobe screwdriver to remove the screws at the bottom of the iPhone and then slide the back glass panel up about 5mm and lift off. You'll then see that the battery connection is screwed down by a single 2.5mm screw (iPhone 4), or 1.5mm & 1.7mm on the 4S. After the battery hold down screws are removed you should be able to lift up the battery connection with your fingernail or a plastic spudger - DON'T use a metal device.
Don't bother trying to dry your phone out by putting it in rice. While rice can be used for some level of moisture absorption, in reality it's not going to have enough to fix the phone. If you're truly desperate then I'd suggest getting some of the new crystal kitty litter, which is silicate, the same stuff that is used in moisture-absorption packets in food and electronics.
Liquid ingestion into iPhones is quite a problem, but it's not always a death sentance for the phone, so long as you've been quick about it. Most often the corrosion damage tends to develop around the display connectors and the power components.
This corrosion can be washed away with the right facilities and cleaning agents, and if it hasn't been left too long the phone will likely come back to life, with only a few pits and scars around its circuit board. The battery frequently will need replacing after a water event, even if it doesn't show signs of distress it's still a safer option to just replace it.
iPhone screens are quite durable and the LCD is glue-bonded to the touch glass, however behind the LCD-glass bond itself there are many layers that make up the LCD and they're not sealed against liquid ingress. Typically when water gets in to your display you'll see strange lava-lamp type blobs, or notice the screen looks deeper than normal. If the ingress gets to the electronics in the display you'll start to see banding. Depending on the nature of the liquid that caused the problem, a lot of these screen defects might go away after drying out, or several weeks.