“Backflow preventer” is nothing more than a fancy name for a check valve. Its purpose is to make sure water flows in one direction. So it flows into your house, or maybe a park, from the city main, but it can’t flow back. It’s purpose is to prevent contamination from an end-user, such as a home, from getting into the general water supply.
The one at left is one common shape, but there are others. The one at right IS in a park. If you start looking around, you’ll see these everywhere. If you have a backflow preventer, you should check to make sure you’re not suffering from thermal expansion.