How does a backwater valve work?

A backwater valve can be installed in the basement at the exit point from the home or building, or in the sewer lateral outside of the building.

The "lateral" is the underground pipe that carries sewage from private property to the city’s sewer main.  The backflow valve is installed downstream and prevents sewage from backing up into the lateral beyond this valve.