Do not try to charge it. You could short it out doing so. It would be advisable to power the phone off and leave it out in the open to dray for a couple days. DO NOT put it in rice. That's an old wife's tail, which is bad to do.
Water and electronics are not good friends. Over time, if water got into the electronics the phone could become permanently damaged. There is no warranty for liquid damage and Apple won't try to fix a liquid damaged iPhone.
Be prepared to buy a new iPhone if your phone doesn't work correctly after letting it dry out.