1. TURN IT OFF. 2. Take it apart - battery out, sim card out, SD card out. 3. Dry the phone off as best you can. Shake it really well in a towel. 4. Put the phone in a bag of dry rice that's been zapped in the microwave. Seal the bag. Let sit overnight.
The water doesn't hurt your phone. What DOES hurt your phone is the electricity going where it's not supposed to *because* of the water. So as long as it's off, it's fine. Just make sure it is absolutely 100% dry inside before powering it on.