Enchantments are used to give items special properties. They can be used for a variety of different purposes to enhance the usefulness of items and equipment in Minecraft.
To craft an enchantment table you will need two diamonds, four blocks of obsidian, and one book. If you cannot find a book, they can be crafted with leather and paper.
To farm obsidian, you will need a diamond pickaxe, which needs three diamonds on top of the other two you need for the enchantment table.
Enchantment tables will also be more effective if they are surrounded by bookshelves, but this takes a lot more resources.