Here is some of the science involved in the death of this famous ocean liner. When something is floating in a liquid, hat liquid exerts a pressure on the object. The net force exerted is upward. If the buoyant force is strong enough to balance the force of gravity, than the object will float. An object that is solid all the way through will float if its density is less than of equal to the density of a liquid.
Large ships can float because they contain a great deal of empty space.
Plus they are shaped so that they displace enough water to counterbalance the weight of the ship and all that is inside it. According to Archimedes' Principle, the force exerted by the fluid is equal to the weight of the fluid that is displaced. It is easy to see why a ship would sink. If a leak springs below the waterline, than the ship would start to fill with water. The ship wouldn't displace as much water because it is filling with it.