How does the shape of an object affect its buoyancy?

According to Archimedes's principle:Any object, wholly or partially immersed in a fluid, is buoyed up by a force equal to the weight of the fluid displaced by the object.

So certain shapes will displace more water/fluid and therefore have more force pushing them up. The classic example is an ocean liner which displaces a lot of water so it floats even though it is very heavy. A piece of heavy metal, say a cube, displaces very little water so it sinks. Even a cube of light metal (Aluminum for example) sinks.

A concrete ship, however, can float. A ball floats just as well as a raft, but it's a question of water displacement. A raft displaces the same amount of water as a ball of the same size, but it is spread over a wider area and therefore "sinks" less than a ball would. Also, things with wider bases are less likely to capsize.