It's simple actually.
Just open your inventory choose the book you wanted by clicking it once and after you picked the book, direct it on the tool you want to apply on, and click the tool once. It's like putting the book on the tool.
If you success, its enchant would be applied on the tool. If you failed, you either just lose the book or sometimes it also destroy the tool too.
The success rate and destroy rate (after failure) is shown on the description.