Don't charge it, don't turn it on, don't use rice or anything else. You can open a window and let the phone air out. Definitely don't try to charge it while it's drying or you could damage it even more. Remember that your phone must be turned off.
Apple says you'll want to wait at least five hours before drying it to charge it. This is the most famous (though not necessarily the best) technique. Get a resealable bag big enough to hold your wet iPhone or iPod and some rice. Reinsert the SIM card, place the device in the bag and fill most of the bag with raw rice.
Leave it in the bag for a couple of days. The rice should draw moisture from the device. Many wet iPhones have been saved this way. Just watch out for chunks of rice that get into your phone.
If none of these tactics work, there are iPhone repair companies that specialize in saving water-damaged iPhones. It's also important to note that some iPhones are actually water resistant, so if you have an iPhone 7 or later, you're luckier. Thanks to the waterproofness, you can expect your iPhone to work well after diving, but if you have any problems with your iPhone in the future, the incident may come back to haunt you.