Put the phone off immediately but do not try to open it and then use airing cupboards to dry it. You can also use rice, which will absorb all the water though the absorption will be a bit slow at room temperature. It it does not work, contact Apple technician.
Turn off the phone completely. Take out the sim card and the slot. Fill a bowl with rice and put the phone into the rice. It'll absorb the water. I dropped my phone in a cup of tea and used this method and now it's working fine