The assumption that the Titanic was unsinkable was based on the Titanic's unique design of bulkheads. These bulkheads, which are compartments below the water line that are divided by partitions to prevent leakage or spread of fire, could be sealed off from one another by closing watertight doors.
However, these bulkheads, that were assumed to be watertight themselves, did not have transverse overheads (sealed tops or coverings). Thus when the Titanic struck the iceberg and water filled the first damaged bulkhead, water began flowing from the top of that bulkhead into the next.
This continued action simulated the filling of an ice cube tray by tilting the tray and letting the water spill over from one section to the next. Eventually, water flowed from one bulkhead into the next, causing the Titanic to sink.