What processes cause basalt to form a columnar structure?
I have run across many pictures of rocks that look like almost perfectly carved columns. For example: the Twyfelfontein Organ Pipes, the Basaltic Prisms of Santa Maria Regla, and the waterfall Svartifoss (pictures included on this link: http://www.touropia.com/natural-rock-formations/). All of the rocks I have seen that look like this have been basaltic. Is this shape caused more by how the rock originally formed, its mineralogy, or how the rock was eroded?
The core idea is how the rock was formed, and what method of cooling caused the rock to contract. Basalt starts are a hot liquid, and as it cools contracts to a hexagonal (or more sides) columnular shape.