Pull the battery out. That will shut it down.
If it got wet recently, keep the battery out, put it in a jar of uncooked rice for a couple of days to draw the moisture out, then see whether it's any better. Turning a phone on before it is thoroughly dry only increases the damage.
If this is old water damage, there's nothing to do but get it fixed or live with it until it dies completely (water damage is insidious, I'm afraid).