The second thing that he needs to learn (after getting him to understand the meaning of the click/treat) is how not to mug.
I prefer to use a bum bag for treats rather than pockets so I would rattle the treats so that he starts to mug. Ignore his behaviour and don't treat under any circumstances. When he gets bored and stops then click and treat. Repeat until he's got the idea. You can then go on to ask the horse to 'look away' so that you give the command and when they look away you click and treat. I've found that very useful with my previously very muggy mare!
They need to learn that mugging doesn't open the vending machine, nor does banditing by trying behaviours that you haven't asked for. They may, for example, do a good curtsey but if you haven't asked for it then you shouldn't click/treat.
Also look at what you're using for treats. I avoid anything sugary and on the rare occasions that I've had to (or elected to) use polos I always chop them into quarters or, preferably, use sugar free. I tend to use lucienuts for most things with chopped up carrots for teaching new behaviours or for an outstanding response.
Once the behaviour is established you need to move onto a schedule of reinforcement so that you don't click and treat every time they do the behaivour. There is a fixed schedule where you click/treat every so many behaviours (you might click/treat after every three for example) but they can learn to predict when the treat is coming. What I prefer is a variable schedule, a bit like a slot machine, so that they get a treat every now and then but he doesn't know exactly when. This makes them keep on trying for the treat so the behaviour doesn't tail off.
There will become a time when you don't need to click/treat certain behaviours as the behaviour is established. I would always click and treat every try for new stuff though.
There are lots of good books out there, Karen Pryor (Don't Shoot the Dog), Alexandra Kurland, Ben Hart etc and an excellent book on how horses learn coming out early next year, it's not specifically on clicker but looks at the different types of reinforcement/punishment, why they work and what are the pitfalls.
HTH x