Minecraft wiki entry for Enchanting, associated text: Through an enchanting table in exchange for experience points and lapis lazuli. Only unenchanted items may be enchanted this way.
Through an anvil, combining an enchanted book with an item.
Through an anvil, combining two of the same item with different existing enchantments into a single item that has the enchantments of both.
Through a librarian villager, which may enchant books respectively for emeralds instead of lapis lazuli and experience.