When engineers need to build supporting structures in areas that would otherwise be underwater, they construct temporary walls called cofferdams. A cofferdam is a wall structure that is built into the floor of a water basin, made watertight, then the water is pumped out to allow for a dry workspace.
In terms of geotechnical engineering, the process isn't as simple as just pushing walls into the ground, engineers have to carefully desing the structure to not flood and keep the workers inside safe from collapse. Most traditionally you would see cofferdams in the construction process of support piers for bridges, but they can be used in a wide variety of aqueous engineering
[Image Source: Winona Daily News]
To construct a cofferdam, engineers drive interlocking piles into the bed of the water basin. Before this is done, engineers have to calculate the necessary depth that each pile needs to be driven into the ground. This is done through analysis of the soil layers and water table levels in order to keep uplift and seepage from occurring in the work area. If not designed right, the external water pressure can force water around and up into the "dry" work area. When construction of a structure is completed, cofferdams are typically removed and the built structure is subsequently submerged in water.
[Image Source: U.S. Army Corps of Engineers]
When ships need to be repaired, engineers will also use cofferdams as a sort of drydock to isolate the ship from the water and repair it where it sits. This is typically done on larger ships where it would otherwise be impossible to lift the ship out of the water. So, for example when a cruise ship is lengthened or expanded, engineers will construct a cofferdam around the ship and pump out the water, allowing for workers to have a dry work area. It is important to note that cofferdams are not cheap, but for the projects where they are used, they are the only construction option.