Details
An Anvil is a block that uses the new item repair interface to repair, rename, and combine enchantments on items. The Anvil uses a complex XP cost system, where the way the tools are positioned and how many times they are repaired affect their cost.
http://www.minecraftwiki.net/wiki/Anvil