This can be accomplished by throwing Freeze Bombs at Tar. Before doing so it is advised to create Tar-cataracts and/or deep lakes of Tar first to get a maximum of Coal Nodes.
As one Freeze Bomb can freeze up to 7x7 portions/"blocks" of liquid in width and usually 3-4 in depth, you could dig a 7x7 wide hole at least 4 blocks deep and fill it with Tar to optimize the amount of Coal created. To fill a hole properly without leaving any empty spaces you might want to build bridges over the hole one after another and place the Tar on each block of the sides of the bridge .
Afterwards Extractors of any kind can be applied to the Coal Nodes as usual to extract the Coal inside. Some players prefer to use up any basic and Advanced Extractors that they have found in Treasure Chests, others will craft Super Extractors from a rare Recipe only obtainable from the Thing (a creature from the Corruption layer) for maximum output.
Since R26 in December 2015, the balance for creating infinte amount of Coal (and Diamonds) was changed. "Coal Towers" simply made from Ice will not produce Coal any longer, as Tar now flows significantly slower and fills one block after another with a new Tar-source each that does not cool down deep enough by being surrounded by ice-blocks. Tar can still be made into Coal with Freeze Bombs though.
Since R34 in September 2016 the crafting recipe for Freeze Bombs now requires to craft Iron Mining Cells and Armor-Piercing Bombs to be unlocked, while the Freeze Bombs themselves can only be made with Rambeau Tufts and Blizzard Chizzard Gizzards.