Latching relays work by having 2 sets of coil contacts used to actuate the state of the relay. When one set of coil contacts is energized, the relay switches over to its normal energized state and holds its position even if power is removed from the relay coil. It is not until the other set of coil contacts is energized, that the relay resets back to its original electrical state. Refer to the diagram to see which pins are used to actuate the relay.
Note: It’s important to keep in mind that before applying power to the de-energized set of coil contacts, power should be removed from the first set to ensure the relay switches states properly.