It can be quite scary for riders when their horse or pony spooks, however horses are 'flight animals' so it is a natural instinct.
What can we do to minimise this? The first thing we need to do is to stay as relaxed as possible, because when we tense up our horse can feel this and we will make them feel even more anxious. You also need to take charge so the horse can be confident you're the leader. Your horse will feel reassured if you take the lead and let them know you are the boss. If you don't do this you may find your horse will start to spook at objects he wouldn't normally react to.
Even if you don't feel confident you need to pretend you are: 'fake it til you make it! '. Your horse won't know the difference unless you react by tensing your muscles and gripping the reins too tightly. If you are having trouble relaxing your muscles try concentrating on your breathing. You will be doing lots of short, shallow breaths if you are tense. Take a long, deep breath, all the way down to your lungs, then hold it for as long as you can and slowly exhale through your mouth. This will allow your ribcage to expand and your muscles will relax. You may need to repeat this a few times.
You can make your horse feel more confident by riding him firmly with gentle yet firm contact on the reins, and by keeping your legs firmly on your horse's side. You also need to make sure your horse's attention is on you and not on the scary object. You don't need to ride your horse fast, just keep him occupied by doing lots of transitions, walk to trot, half halts, trot to walk etc. You can also give him some exercises to do, moving his forehand off your leg by exerting pressure. Bend the horse's neck away from the scary object and make him look the other way and focus on you. If you look at the scary object, you may be validating your horse's concerns because you are reacting to him and he will become more spooked.
Some horses are happy to take it all in their stride. Others are more highly strung and likely to react. If you have a horse that does react you need to be pro-active by occupying his mind and exposing him to many objects. Start off somewhere safe at home and expand his horizons from there. You need to give your horse the chance to learn to respond to you in scary or stressful situations by practicing at home. If you expand your 'comfort zone' bit by bit, you will soon be able to handle more situations and do what you do best - enjoy riding your horse!