The anvil is used to shape ingots into tool and weapon heads, armor, and more advanced anvils. The basic anvil is made from raw igneous rock by right-clicking with a hammer on its surface. This stone anvil can only be used to shape tier 1 metals, i.e. copper.
At tier 2, you will be able to shape bronze, bismuth bronze, black bronze, and rose gold. Tier 3 gives you the ability to shape wrought iron, tier 4 steel, tier 5 black steel, and finally, at tier 6, blue steel and red steel.
Each tier of anvil has the capability of welding two ingots together of the tier above, enabling you to create the next tier's anvil. Welding requires flux.
Anvils (other than stone) are crafted by combining 2 ingots at an anvil into double ingots. Seven (7) double ingots are then placed in the crafting bench in a lying down H fashion, to yield an anvil. Each tier anvil must be created, in order, to reach the final tier anvil.