The Titanic hit an iceberg.
The ill-fated RMS Titanic struck a North Atlantic iceberg on the evening of April 14, 1912, at approximately 11:40 PM. The ship was traveling at a speed of 20.5 knots (23.6 MPH) when the collision occurred. The iceberg scraped along the starboard (right) side of the hull below the waterline, creating a series of breaches across five of the ship's watertight compartments. This damage ultimately led to the sinking of the Titanic.
While glaciers are the origin of icebergs (icebergs break off or "calve" from glaciers), the Titanic specifically collided with a detached iceberg floating in the ocean. It did not hit a glacier directly.