Enchanting is an in-game mechanic that allows you to give special abilities to tools and armor. You will need an enchanting table in survival mode, but you can use the ‘/enchant’ command if you are in creative mode with cheats enabled.
Enchanting through the enchantment table requires player experience or levels and Lapis Lazuli. Once you place the tool/armor/book, you can select from three choices of enchantments, each requiring different amounts of experience and Lapis Lazuli. Once you select one the item will be enchanted. Surrounding your enchanting table with bookshelves will increase the levels and tier of enchantments available.
How to Use the Command in Creative
/enchant [Player name] [name of enchantment], [level of enchantment]
Basic Crafting Recipes for Survival
1 Book, 2 Diamonds, 4 Obsidian
This is the starting point for enchanting. Once you have an enchanting table placed down you will be able to access the lower tier enchantments. Placing bookshelves around the crafting table will give you access to the higher tier enchantments.
3 Paper 1 Leather
If you would like to make enchanted books you can find them or craft them. You can enchant them with one book and three Lapis Lazuli in an enchanting table. You can also obtain them randomly from fishing as well.
6 Planks and 3 Books
Placing this around an enchanting table will allow you to get higher tier enchantments. 15 bookshelves will max out your enchanting table. The ideal position of the bookshelves is a square of 15 placed in a 5x5-block outline, with the enchantment table in the middle.
3 Iron Blocks and 4 Iron Ingots
Anvils will let you repair enchanted tools and combine two tools/items of the same kind together, giving you one tool with all the previous enchantments (unless two enchantments conflict with each other). Additionally, you can combine enchanted books with a tool/item to add the enchantment.