Hello,
You cannot put haste on a pickaxe. You must put it on a piece of armor. You can do that by taking the book and hovering over the armor piece you'd like to use, and then right-clicking. After you put the enchantment on the armor piece, you can wear it and you will have the effects.