If it shuts off then comes back on later it's almost certainly the switch... but.
Never replace anything until you've checked it. Put a test light/meter on the heater motor then run it until the motor shuts off, then look at the meter. If the voltage is zero, or practically zero, it's the switch. If the voltage is up near normal (12.5 - 14) it's probably the motor.
car cuts off
To shut off the water to the water heater, locate the shut-off valve on the cold water supply line leading to the heater. Turn the valve clockwise to close it and stop the flow of water to the heater.
To properly shut off the water supply to the water heater, locate the shut-off valve on the cold water pipe leading to the heater. Turn the valve clockwise to close it and stop the flow of water to the heater.
If you have your own water heater there should be a shut off at the heater. If not I would look under the kitchen sink. There may be shut off valves at each fixture. If there is a central water heater in the basement, there would be a shut off to each unit.
check the wireing harnesses
To turn off your water heater, locate the shut-off valve on the cold water supply line leading to the heater. Turn the valve clockwise to shut off the water flow to the heater.
To turn off your water heater, locate the shut-off valve on the cold water supply line leading to the heater. Turn the valve clockwise to shut off the water supply to the heater.
Idling cars started before the Ford Model T in 1909. In those days cars were very dificult to start so once you hasd them running you didn't shut them off untill you were done with them. Now we Idle to warm or cool our cars. Blame the guy who invented the car heater.
Your heat pump is going through a defrost cycle.
yes it will shut down. the low pressure switch will shut it down.
There is a thermostat somewhere, usually on the wall or on the heater itself. Just turn the breaker off at the breaker box. Label the breaker if it is not already labeled. Once the power is turned off to the unit, you can disconnect the wires inside the heater to permanantly shut down the unit.
To turn off the water to the water heater, locate the shut-off valve on the cold water pipe leading into the water heater. Turn the valve clockwise to shut off the water supply.