Welcome, and let's begin. Drop a solid steel bolt into a bucket, and it sinks straight to the bottom.
Build that same steel into a hollow hull the size of a football field, and it carries thousands of tons across an ocean. Nothing about the metal changed. What changed is how much water the object pushes out of the way.
A ship floats because of a rule you can test in your kitchen: an object floats when it pushes aside, or displaces, an amount of water that weighs as much as the object itself. This is Archimedes' principle, named after the Greek thinker who described it more than two thousand years ago. A solid steel block sinks because it displaces too little water for the buoyant force to support its weight. Shape that same material into a wide, hollow hull filled mostly with air, however, and the story changes. A large cruise ship can weigh tens of thousands of tons and still float because its hull displaces an equal volume of water. The resulting upward buoyant force balances the ship's weight and keeps it afloat.
Here's the part people miss. Most of a floating ship's volume is air. A cargo ship might be 90 percent air by volume inside the hull. Air weighs almost nothing compared to water, about 1.2 kilograms per cubic meter versus roughly 1,025 kilograms for seawater. So the average density of the whole ship, steel plus air plus cargo, ends up lower than the density of the water around it. Lower average density, and the ship rides high. Fill that same hull with water, and it drops like a stone, which is exactly what happens when a ship takes on too much water through a leak.
You don't need wood or plastic to float. You need the right shape. A flat-bottomed barge with tall sides can float because its wide hull displaces a large volume of water for very little weight. Compare that to a steel rod the same weight, thin and dense, which sinks immediately. Submarines show the same principle in reverse. They carry ballast tanks that fill with water to sink and expel with compressed air to rise. The steel never changes. Only the average density does.
Floating is one thing. Staying upright is another. A ship's center of gravity sits low, usually near the bottom of the hull, because heavy engines and ballast are placed there. When the ship tilts, the water pushes back on the lower side, righting it. This is why you can stand on the deck of a ferry in choppy water without falling over. The hull is doing constant tiny corrections, thousands of them an hour.
Next time you're on a boat, look at the waterline. The part of the hull below that line is the part doing the work. It's pushing aside water equal to everything above it: passengers, fuel, cargo, and the steel itself. That's the whole trick. Just a shape that moves enough water to hold up whatever you put inside it.