The fracture pattern that forms at the cooling surface will tend to be propagated down the lava as it cools, forming long, geometric columns. Thus, as lava cools to form basalt, it may crack in a hexagonal (or other) shape and form columns.