Quote from rbailey5
you need to place some bookshelves around your table. The more you have, the higher levels you'll get.
stack them two layers high.
Some extra stuff: no torchs or any blocks on the bookcases, and you can remove two ( for a doorway) and still get level 50 (but level 50 is SO rare, don't even bother)