How can ships float? Why do ships sink?

According to a natural law called "Archimede´s principle", any object immersed in a fluid experiences an up-thrust force (buoyant force) equal to the weight of fluid displaced. If such force exceedes the object´s weight, the object floats. If not, it sinks.

How does the Archimede´s principle work? In a few words, how big the up-thrust force is (so, how easily can the object float) depends on two main factors: the nature of the fluid, and the object´s shape. In the same conditions, objects displacing a lot of fluid will have a better buoyancy than those displacing just a little. To no surprise, a very fat person is more buoyant than a skinny one!
Furthermore, fluids have different weights, which depends on their density. If the fluid is dense it is also "heavy", the up-thrust force generated is higer and floating is favoured. Think about swimming in the sea (salted therefore dense): isn´t it easier than fresh-water swimming? 

Of course, even objects displacing a lot of dense water may sink if their wheight overcomes the up-thrust force! Think, for example, of small timber frame: it floats just until the very moment you try and sit on it! 

Usually, ships don´t sink because of overload. Load is normally well calculated taking safety ranges into account. Yet, ships may crush on rocks or other objects and may break into pieces that fill up with water and become too heavy to float. To try and avoid that minor leaks sink a ship, modern hulls are generally divided into compartments that may be better sealed if needed.