These columns tell a story of the cooling and freezing of the lava flows that formed them. As lava at the surface cools and freezes, it also shrinks as its molecules rearrange themselves into a solid structure. This happens much more quickly at the surface where the lava comes in contact with moist, cool air. As the basalt cools and shrinks, pressure increases in intensity and cracks begin to form. A way to dissipate this huge stress is to crack at an angle of 120 degrees, the angle that gives us a hexagon.
We see this beautifully illustrated at the Giant's Causeway in Ireland. Here, highly fluid molten basalt intruded through chalk beds which later cooled, contracted and cracked into hexagonal columns, creating a surreal visual against a dark and stormy Irish Sea.