Enchanting is a game mechanic that involves using an Enchantment Table to add special bonuses to tools, weapons or armor. To enchant an item, you will need the required Experience level for the enchantment and an Enchantment Table. 
Notch has stated that Enchanting will work in three stages and the benefits will be based on the spell you choose, but a random loot element will be included as well.[1][2] Each spell will cost the player experience levels but in turn allows the player to enchant armor, swords and tools with one or several random bonus attributes as well as making the items glow with a brilliant hue. 
History: Notch first tweeted about the Enchantment Table on September 30th 2011.[3][4] 
Enchanting was added to the game in 1.9 prerelease 2. However, enchanting was not the same in the 1.9 prerelease 2. Enchanting did NOT require bookshelves to get maximum enchantments. Also, many enchantments were not added back then. Enchantments are labeled in the enchanting table as random words in the Standard Galactic Alphabet. 
Enchantment names are randomly constructed from a long list of words. Three to five words are chosen from the list and appended to each other, creating the enchantment name. Any name can be chosen for any item. Note that the names are not actually saved with the item, they are only displayed in the Enchantment Table interface, albeit with the Standard Galactic Alphabet. 
scrolls klaatu berata niktu xyzzy bless curse light darkness fire air earth water hot dry cold wet elder ignite snuff embiggen twist shorten stretch fiddle destroy imbue galvanize enchant free limited range of towards inside sphere cube self other ball mental physical grow shrink demon elemental spirit animal creature beast humanoid undead fresh stale
Repairing an enchanted weapon/tool will remove the enchantment on it.[6] 
When an enchanted weapon deals bonus damage to a mob, circular blue particles fly off of that mob, similar to getting a critical hit. 
There are several levels on most enchants, and when you enchant you can get several enchants on each weapon/tool/armor.
Enchanting Basics: To enchant an item, craft an Enchantment Table, place it on the ground, right-click on it and drag an enchantable item from your inventory onto the square under the book icon. Three randomly chosen enchantments will appear on the menu on the right. The only thing you can know for sure about them is their level, which appears as a number; the foreign text is random. You can take the item off and place it on the table again for a different set of enchantments. Or, you can attempt to replace the item on the table with a stack of two or more of any other item from your inventory. 
A chart showing the relative probabilities of the different enchantment levels in the bottom slot with 30 bookshelves.Once you choose an enchantment, it will be applied to your item, giving it a glow and one of the special powers detailed below, and you will lose a number of experience levels equal to the level of the enchantment. Enchantments cannot be undone (unless you repair the item, which removes enchantments) and an item can only be enchanted once (although you may receive multiple enchantments during one instance of enchanting, determined randomly). 
Whenever you place an eligible item on the table, the enchantment levels available are randomly generated for each slot using the formula below. The enchantment level is dependent upon the number of nearby bookshelves (capped at 30) and a "slot factor" of 0.50 for the topmost enchantment slot, 0.66 for the middle slot, and 1.00 for the bottom slot. (If the number of bookshelves is 0, the second two random integers will always be zero. When placing bookshelves around the Enchanting Table they CANNOT be touching the table or the table will not change from 5. 
Enchantment level available = (1..5 + 0..(b/2) + 0..b)  s, where b is the number of nearby bookshelves (maximum of 30), s is the slot factor for the given enchantment slot, and x..y generates a random integer between x and y inclusive. (Note that however many bookshelves are being used, 1 is still available as the lowest level.) 
Bookshelves  0  1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19  20  21  22  23  24  25  26  27  28  29  30  
Max Level  5  7  8  10  11  13  14  16  17  19  20  22  23  25  26  28  29  31  32  34  35  37  38  40  41  43  44  46  47  49  50 
Bookshelf Placement: Nearby bookshelves increase the level of enchantments further. As of Beta 1.9 Pre-release 4, no enchantments costing above five Experience levels are available unless you place bookshelves near the Enchantment Table. In order to have an effect, a bookshelf must be placed within 2 blocks, laterally, of the enchantment table and be on the same level or one block height above the table. A bookshelf generally has to have a line of sight to the table, although bookshelves placed on the corners of a square will still have an effect. An enchantment table can be surrounded by 30 bookshelves by placing them in a square around the table, with each wall measuring 5 blocks wide and 2 blocks high, with a 2 block high doorway. This arrangement gives access to level 50 recipes.
Trivia:The Feather Falling enchantment could be from the Dungeons & Dragons wizard spell of the same name. 
Looting enchantment does not process on Wool, Spider Eye, Raw Chicken and Cooked Chicken. 
Items that are enchanted will receive a glowing aura around them. Editing glint.png in .minecraft\bin\minecraft.jar\misc can change the glow accordingly. Enchanted items also cause the hotbar to become semi-transparent whilst they are the selected item. The hotbar will revert to its opaque format when you select a new item. 
Repairing an enchanted item using another item will remove the enchantment it has. 
On October 1st 2011, Notch tweeted an image of the enchantment screen, with enchantments written in the Standard Galactic Alphabet.[12] The first enchantment translates onto "Well Played Internets You Are Good", the second translated into "These Names Will Be Random And Confusing", and the third translates to "Each Spell Costs Experience Levels". The Standard Galactic Alphabet or SGA was originally created by Tom Hall for use in the Commander Keen series of computer games.[13] 
Three of the possible words for enchantments are "the elder scrolls," likely a joke at Bethesda, creator of "The Elder Scrolls" series and whose parent company, Zenimax, was suing Mojang. 
The words "klaatu berata niktu" are a (misspelled) reference to "Klaatu barada nikto", a phrase that originates from the 1951 movie The Day the Earth Stood Still and has been since used as a reference in many other movies, cartoons and games, more popularly in Army of Darkness, Star Wars Episode VI, Teenage Mutant Ninja Turtles(1987) and Duck Tales. Similarly, "Xyzzy" is a magic spell in the game "Colossal Cave Adventure" and has been used in several other games as an Easter Egg or cheat code. 
"Embiggen" is a fictitious word from The Simpsons, from a quote attributed to Springfield's founder, Jebidiah Springfield: "A noble spirit embiggens the smallest man". 
All tools, swords and armour enchanted before 1.9 Prerelease 4 will only have Feather Falling I as their enchantment. 
The Silk Touch enchantment is possible on all levels of enchantment when enchanting a golden pickaxe, although extremely rare on enchantments below level 20. 
Enchanted items still pulsate while you have paused the game 
An enchanted stone shovel or pickaxe with the efficiency level of 1 will do the same efficiency as a standard stone axe 
It is worth noting that when using third-party software it is possible to enchant the Bow, while it is not possible to enchant items such as minecarts, apples etc. This could mean there are future enchantments planned for the bow.
Bugs:In Beta 1.9pre4 it's possible to get Silk Touch and Fortune on the same tool. (It's a bug! --Jeb 09:58, 15 October 2011 (UTC)) (proof) 
Using the "Silk Touch" enchantment, it is possible to obtain either Redstone Ore or Glowing Redstone Ore, depending on the block's state when broken. These are different blocks and do not stack, but appear to be identical in the user's inventory. 
Mining gravel with a tool with Fortune IV or greater causes the game to crash. 
When a normally unobtainable block is mined using the Silk Touch enchantment, the tile entity of the block is not kept. Therefore when a mob spawner is picked up, (was possible in pre-4, but was removed in pre-5) it will revert to a pig spawner. 
Mining ender dragon egg with Efficiency V will crash the game. 
Sometimes,logging off a server with an enchanted tool on you, will remove the enchantments from the item. 
In multiplayer, players can only see their own enchantment auras, and not those of other players. 
If a enchanted item is dispensed from a dispenser, the enchantment is lost.