Horses have some bad habits. Although they are usually very gentle and sweet, some horses kick out of habit. This isn't usual. Older horses don't tend to kick as much as younger horses.
When a horse kicks, it's usually either because it feels threatened. If you approach a horse from behind it, laying a hand on it's rump, it may be startled. This will scare the horse, for it might not be able to see you. Although a horse's eyes are on the sides of it's head, a horse cannot see directly behind its tail. If you approach from behind its tail and lay a hand on its rump, the horse won't be able to see you. It may startle and jump a little, and a younger horse may kick.
If you're standing where you're standing about maybe three feet away from the horse's tail when it kicks, you could be seriously injured.
This is because the horse can kick out more and get you (usually it'll kick your leg), but if you're up next to the horse and you can brush against its tail, the horse can't kick as farther and hurt you more.
To stop a horse from kicking, take him into a round pen or paddock and free lunge him. First, get a whip and keep it low to the ground. As your horse circles at a walk, trot, or canter, lower your eyes to his rump.
The horse will stop and approach you. Never look the horse in the eye. Just wave your arms or yell and the horse will take off again. Keep doing this, and finally let the horse approach. This usually teaches the horse not to kick.
If possible, start from the earliest age you can. Start teaching a foal or young horse good manners. They will learn to do this, and when they're older, they won't have many bad manners.
Just my advice,