Anti-Submarine Boom Nets were typically used during WWII as a defense against enemy submarines from entering a protected harbor. They would stretch across the entrance to the harbor and would be lowered or moved to permit friendly vessels to enter and exit.

Constructing an anti-submarine boom net
Deploying an anti-submarine boom net
An anti-submarine net being stretched across harbor entrance