A dry dock is like a giant bathtub that ships can float into so that they can be repaired, cleaned or painted without getting wet. It's like taking a big swimming pool and putting a very heavy cover on it. The cover keeps the water out, so the water inside the dry dock stays dry.
When a ship comes into the dry dock, the water is pumped out, and the ship is lowered onto blocks or a platform. These blocks keep the ship in place so that the workers can walk around and fix the ship. Imagine putting your toy boat on a shelf; it won't float away or move around.
Once the ship is in the dry dock, workers can clean and paint the ship's hull, and fix any damage or corrosion. They can also replace parts, such as propellers or rudders, that are difficult to replace while the ship is in the water.
Once the work is done, the dry dock is flooded with water again, and the ship is floated out. The ship is now as good as new and ready to sail!