Take a big pool of lava, then allow to cool slowly. As it cools, it solidifies, then contacts. As the contraction is regular, the cracks formed by the contraction are also regular, giving those divided pillars. You get the same sort of thing in exposed riverbeds in the summer.....
But the Giants Causeway is definitely laval in origin. May have been the bottom of a lava cave....