How does a floating dry dock work?

First the dock is flooded and submerges enough to allow a ship to sail in. Then the water is pumped out of the tanks and the floating dock rises, lifting the ship out of the water. In this way work can be carried out underneath the ship’s hull.