~10 min
An enchanting table is crafted from 4 obsidian, 2 diamonds, and 1 book, with the book itself made from 3 paper and 1 leather. To use it, place an item in the slot along with 1 to 3 lapis lazuli, and three randomized enchantment options appear. Most tools, weapons, armor and books can be enchanted this way; a handful of items, like shields, can't be enchanted at the table at all and need an anvil plus an enchanted book instead.
Bookshelves placed around the table raise the level cap on those three options. With zero bookshelves nearby, the level requirement shown never goes above 8, no matter how lucky you get. Each bookshelf needs a one-block gap of empty air between itself and the table to count — any block in that gap, even something as small as a torch, cuts that shelf off entirely. Reach 15 correctly-placed bookshelves and the cap opens all the way up to level 30, the highest an enchanting table offers; adding more than 15 doesn't push it any further.
Here's the part that catches new players off guard: the level number next to each option (say, 7, 18, or 30) is just the minimum player level you need to have in order to unlock and select that option — it is not what you're actually charged. What you're charged, in both experience levels and lapis lazuli, is exactly the lapis lazuli cost listed for that slot: 1, 2, or 3. So a slot that requires level 30 to unlock might only cost you 3 levels and 3 lapis once you actually pick it, as long as you had at least level 30 to see it in the first place.
3, not 30 — the level number is only the minimum needed to unlock the option; what you're actually charged matches the lapis cost shown for that slot.