When the phone is well protected by a good case, then immediately removing the case can prevent more wetting and damage.
When there is no cover or case, then the first aid acts are removing the battery, and placing a dry handkerchief or absorbent cotton in the battery space and keeping the phone in that way with screen facing up. Then after sometime take the phone to a good mobile repair technician. He may do the rest.
Some manufacturers place some stickers(water seal) at certain places inside the phone. When the phone falls into water or gets wet the water seal stickers at those places change colour. That may void the warranty and guarantee. That also gives an idea which all places got wet.
I have seen some tips in the internet that a wet phone may be placed inside a bowl/box of dry rice after removing the battery. The reason they say is the rice will absorb the humidity and wetness in the phone. Then after a few hours the phone ma be taken to a mobile repair shop.
Once when I was bending at a washbasin, the two mobile phones inside my shirt pocket fell down on the wet and flooded floor. One phone which was only a feature phone immediately broke into three parts -battery, phone and back cover. The other one a costly smartphone fell as dud and appeared not drenched much.
Ironically I later found from the technician's inspection that the costly smart phone had really got wet as water entered inside of the phone and got shorted (though outwardly it appeared dry after I wiped it with a cloth). That phone became fully damaged and became useless. as beyond repair. The less costly feature phone, though showed signs of water seal getting wet and changing colour, I am still using it. Of course the memory card was damaged.
I was then that I learnt that phones are built to break and separate on falling, to avoid more damage.