A check valve is a device used to stop water from flowing back in the opposite direction if the water pump stops working.
The most common use is in an aquarium that has a sump filter system. As water is pumped up into the aquarium, the water level rises in the tank until it overflows into the drain and then flows back down into the sump. The rise in water level in the tank is known as the head. When the pump is turned off, that extra water, or the head, drains back down into the sump until the pump is turned on again. What can also happen is the return line for the pump begins to back flow and siphon water from the tank down into the sump until the end of the return pipe comes out of the water, breaking the siphon. If that pipe is down in the water quite a ways and the tank is large, a lot of water can siphon back into the sump and potentially overflow. A check valve will help to prevent this from happening.
A check valve consists of a fitting with an internal flap. As water is pumped up through the valve, the flap opens up allowing the water to flow through. If the pump is shut off, the weight of the water above the flap falls back down onto the flap and shuts off the flow. It will stay sealed and not allow water to flow back down into the sump until the pump is restarted.
Check valves can fail as they get older. The seals can get hard over time and the flap can get algae and bacteria buildup. Use this as a second line of defense along with siphon breaks and pipe placement. Plumb them with union fittings so they can be easily removed and replaced if necessary. Some come with unions built in.