The first thing to do is get your cell phone out of the water as soon as possible. A cell phone dunked for a few seconds will be much easier to revive than a cell phone that swam around in your swim trunks with you for an hour (the latter probably won’t be able to be revived at all). Take the battery out immediately as well as cutting the power may keep eternal electronics from malfunctioning.
Then dry your phone. You can use paper towels, tissues, toilet paper, whatever you need to get it dry. Other methods include putting your wet cell phone in a sealed bag with those little silica packets that come in shoe boxes (as per packaging instructions don’t eat them), burying your phone in a container of dry rice (although you may be picking rice out of the buttons for some time), leaving your phone in the sun for a short time of even putting it in the refrigerator.
Now wait. Waiting is hard but you should wait until your phone is completely dry, it may take a few days, before reconnecting the battery. If your phone’s screen is foggy it is not dry enough. If you phone sloshes when you shake it is not dry enough. If river mice are canoeing between your phone’s buttons it will probably never be dry enough.
With some luck and good timing it is possible to revive a wet cell phone. While these methods do work your phone can’t have been submerged for too long. If your cell phone does find its way into the toilet or washing machine act quickly, remove the battery, and completely dry your phone. Don’t reconnect the battery until it is dry as this can cause internal electronics to short circuit. Good luck reviving your phone and if it doesn’t work, hopefully you have insurance that covers water damage.