Shying is a very adaptive behavior in a horse. Its roots lie in the horse's need to run away from danger, and to be ever-on-the-alert for things that may harm him. As a prey animal, this trait has served him well in helping him escape injury or worse from predators. But, unfortunately, it is not so pleasant a trait for the horse's rider.
Many riders, failing to understand the origin of the horse's shying, discipline this behavior harshly, which only increases the horse's fear of the object (he gets hurt when he is near it), making him more likely to shy again.
Happily, there is a reasonably easy and quick way out of this situation. The rider won't ever be able to prevent all shies, but will be able to make the sideways jumps smaller, and even eliminate some of them. First, though, he must teach the horse to move sideways in response to pressure from his leg. This is called a leg yield, and is easy to achieve. From the ground, the rider should take the reins over the horse's head and stand facing the horse with them in his left hand. He then should move slightly to the horse's left side (not pulling on his head), and tap him gently with his hand, increasing the pressure until the horse moves away. At this point, he should reward the horse with a treat. If the horse doesn't yield to hand pressure, he can use a whip gently to make the horse move over.
When the horse reliably and willingly steps away from light pressure on his left side, the handler should school the horse to move away from pressure on his right side. After the horse has learned this, and is calm and reliable, the rider should mount. Sitting squarely in the saddle, and maintaining contact with the horse's mouth to keep him from moving forward, the rider should apply pressure from one leg, using a whip to reinforce the aid (but without scaring the horse.) If the horse doesn't make the connection, the rider should get another person on the ground to gently use the whip as the rider presses with his leg. Generally, this will get the horse to move away. The rider should praise him and offer a treat. Then the rider asks again with the leg, and if the horse moves away without the whip, he should give him a treat again. When this behavior is reliable, switch to the other side, and get the horse to move away from the leg using the same procedure, and rewarding the horse when he willingly complies. The rider must stay calm and not get abusive.
Repeat for several days, until the horse is willing to move away from the rider's leg, and shows no anxiety. Then the rider can ride him past a scary object, but far enough away so that the horse is a little reluctant but not panicked. When he tries to shy away, the rider should keep the horse's neck straight with the reins, and use his leg CALMLY to get the horse to take one step closer to the scary object. Then praise him and give him a treat.
Progressively over a few days, use this procedure to get the horse closer and closer to the object he fears. The rider must not become abusive. Each day, try to stop on a good note, even taking a step back to something he will willingly do so the rider can reward the horse. Continue to practice until the horse complies with the request from the leg without hesitation. Then perform the same procedure from the beginning with other scary objects, one at a time. In a matter of a few days, the horse should willingly move away from either leg toward a suspicious object. He will not, of course, move sideways away from your leg into a growling lion: Be reasonable in requesting compliance with your leg, but after a short time you should be able to use this training procedure to get your horse quietly past suspicious objects on the trail, in the arena, at a show ground, in new places. As nothing bad happens to him, he will gain confidence in your ability to keep him safe. He may continue to shy, but the shying won't be as dramatic, and you will be able to control him and get on with your ride.