Apple doesn't exactly say how to turn it off, if it can be turned off. They don't recommend charging the phone if liquid has been detected. At least not through the USB Charging port. Wireless charging is OK, as long as the back of the phone is dry.
If the phone was actually wet, it should honestly be turned off and put in a dry warm place for a day or so and hope it didn't suffer permanent damage. DO NOT place it in rice. That is NOT recommended and cause more damage.
To be completely safe, it would be recommended to schedule an appointment at your Apple Store Genius Bar for evaluation.
Here is the Apple Support Article on this topic --> If you see a liquid-detection alert on your iPhone - Apple Support