In order to make an Enchanting Table, one needs to combine 4 Obsidian, 2 Diamonds, and a Book in a Crafting Table, in the following arrangement:

Place your Enchanting Table in your base or house, make sure you surround it with Bookshelf blocks, keeping in mind there is a tile of air between itself and the Enchanting Table.
Each Bookshelf block in range will increase the max possible enchant level by +2, so to reach the max enchant level of 30, you’ll need 15 Bookshelves arranged in an outline around your Enchanting Table, as illustrated in the below screenshot.