It's called a "relay". There is nothing special here. Normal relays are held in one state by mechanical spring action when the coil is not energized, and in the other state when the coil is energized.
A relay being energized and power going away is no different from you switching it off deliberately. Either way the coil stops producing a magnetic field, and the mechanical spring returns the contacts to the unenergized state.
There are such things as bi-stable or latching relays. These mechanically stay in the same state they were last driven to. Of course driving them is no longer as simple as energizing or not energizing a coil. There are two possibilities. There can be two coils, each used to drive the relay to one of its states. Or, the magnetics can be polarized so that current polarity thru a single coil determines the state the relay is driven to. One way or another, there needs to be at least three different driving states.
Latching relays are much less common, and any such relay will be clearly labeled as such. Just a "relay" has a coil that is either on or off.
For normal (non-latching) relays, contacts are classified as normally open (NO), normally closed (NC), and common (COM). NO and NC refer to the switch states when the coil is not energized. A SPST relay is the simplest type, since there is only one contact and therefore two output leads. This type must be specified as normally open or normally closed. If you want the relay to "shut off" when power goes away, then you want a normally open type.
Many relays have SPDT outputs, or multiple of them, like DPDT. In that case, one of the ends is normally open and the other normally closed. These flip state as the coil is energized. The center contact that flips between being connected to the NC and NO leads is the common.