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.