The scale at the top is in mm, and the material is starch rather than basalt.
Found all over the world, [similar geologic formations] are now known to be the result of cooling lava flows, in which shrinkage causes stresses that fracture the rock. The columns are formed as a sharp front of cooling moves into the lava flow, assisted by the boiling off of groundwater. As the front advances, it leaves behind a crack network which evolves into an almost hexagonal arrangement. This network carves out the columns. There are many mysteries: what causes the ordering of the network into hexagons? What sets the size of the columns, which varies in different outcrops between a few inches and a few yards?More details (and more photos) at the Proceedings of the National Academy of Science, via Fresh Photons.
Amazingly, you can make columnar joints in your kitchen! Just mix 50:50 corn starch and water and put it into a coffee cup. Dry the mixture with a bright light above it --- this might take up to a week. When the mixture is dry, carefully break it apart and you will see that the interior is broken up into small “starch columns” a few mm wide [pix at the link]. In this experiment, water replaces the heat in the lava, and the columns are 1000X smaller.