Many different factors can cause shipwrecks but the most common is water entering the hull and sinking the ship. With the Titanic an iceberg broke open the hull. In the case of the Nuestra Senora de Atocha a jagged reef sliced a hole in its hull as it headed from Cuba to Spain in 1622. Very rarely a collision with a wild animal can sink a ship. Ships can also sink following collisions with each other. Many ships are intentionally sunk during wars. Not all ships are sunk by holes in their hulls. Bad weather powerful winds can also cause some disasters.
Buy The Science of a Shipwreck by Lisa Amstutz from Australia's Online Independent Bookstore, BooksDirect.