It is natural instinct for a horse to be protective of their legs. The more the hind feet are handled the more comfortable the horse will get.
I usually train this with a rope only because many of the colts I work have never had their feet worked and the rope allows me to handle the feet without getting kicked.
-I keep the lead rope in my hand with just enough slack so there is no pressure on the halter. This is so I can redirect the horse if it feels the need to move.
-I start by putting a soft cotton rope around the leg I am working. After the horse shows me they stand quite are comfortable with the rope on their leg I will then lift the foot up with the rope and hold it until they give to the pressure or stop kicking or pulling the foot away. As soon as they give me the foot I release the pressure giving their foot back. The release is very important as the horse learns from the release. Again I start with the rope only because it is safer than bending over and picking up the foot with my hand in the beginning stages of training. I will repeat this on each foot over a few days or until they will give me the foot with just light pressure from the rope. If the horse is not comfortable with a rope around their legs then you may need to step back your training and desensitize them to the rope before starting this process. If you are not hand with both the lead rope in one hand and the foot rope in the other you may want an assistant to hold the lead.
-Once they are good giving to rope pressure I will start picking up the foot with my hand and moving the foot in different positions in preparation to put it between my legs. When I first pick up a foot I always start with my hand on the shoulder or hind qtrs and run my hand slowly down the leg to pick up the foot. This lets the horse know where I am and prepares him for what I am about to do. I repeat this exercise until they are comfortable & relaxed having their feet handled and they will allow me to hold the feet in a shoeing position between my legs.
- With the feet on the ground I will stand back and tap a shoe with the hammer to get them accustom to the sound of metal hitting metal. I might walk around them getting them de sensitized to this sound. Once they are relaxed with this sound I will pick up a foot, lay a shoe on the hoof & tap lightly on the shoe, just a few light taps. If they stand quite, I put the hoof down releasing the pressure and rewarding the slightest try. I repeat this on all 4 feet over a few days. Each day I will tap a little longer and with slightly more force until I can tap the hoof with a similar force of nailing a shoe and the horse will stand relaxed.
I do not tie a horse when doing these exercises or during the first shoeing. I do this with the end of the lead rope over my shoulder and a slight bend of the head towards the side I am working so I can disengage the hind end If I need to move them. Tying a horse that is un easy may only increase the anxiety and make the experience worse or lead to a wreck. In the beginning if they need to move I let them move. They will learn to stand quiet as they get confident being handled.
With time and patients this method has worked well for me on countless horses.
Best of luck.