The first time you ride a horse that bucks it is very bloody scary. Some people say that bucks are scarier than a rear, but I've always had horses that buck, so rears weren't normal and so much more scary. Personal experience may vary.
Rear vs Buck
In a buck the horse can run at the same time. He can run and buck and run and buck. This is very scary and difficult to ride. In a rear the horse has to stop and lift himself up. But, he can come down running, and you will be unseated. Also, in the rear the horse can fall over backwards and crush you. This cannot happen in a buck, and while you might think that a horse could buck so hard he might flip forwards onto his back, he's more likely to slip sideways and throw you out of crushing distance. A rear is more likely to happen when the horse is afraid of or angry at something on the ground. Bucks seem to happen when the horse is happy, afraid, or as part of a complicated shy-bolt thing.
Feeling the buck about to happen underneath you is pretty simple. The horse won't pause in his steps, instead he will stride forward further with his hind legs and then push off with them. As this happens his head will drop and you will be pushed forwards. This action feels like you are slowly being pushed forwards, but by the time you have realized this is a buck the horse will have kicked up with a lot of energy and you'll be halfway off over the neck.
If this is a happy friendly buck full of joy, the horse's neck won't go down very far and as soon as it comes up again he'll be doing whatever you asked him to do before the buck. He might need a gentle reminder of this, so kick him on.
But most bucks aren't happy friendly things. Most horses won't stop at one buck. His head might come up for a moment as he dashes forward before coming into another buck, or he could just keep on bucking until you fall off. One buck probably won't kill you, not if you know how to sit it. It's the third or fifth buck in a row that will give it to you. When you are on a horse that is bucking you feel as though your spine is being ripped in two. I have nearly broken my neck several times falling from a horse that bucks. You may break ribs, collar bones, arms, legs and skulls. Wear a helmet. Be sensible. There are no points for being brave and stupid. Seek help if you need it.
The idea of riding a buck is very simple but actually doing it is difficult because it is the exact opposite of what you want to do. You will instinctively curl up, shoulders forward, seat out of the saddle and arms reaching down to grab the horse's neck. Your thighs will not grab the horse, instead your legs will go back against the belly and grip as tightly as they can. The idea of a buck is for the horse to get you out of the saddle. By leaning forward you have practically done the job for him, the legs around the belly mean that you entire position is shot, and his neck will be going up and down so holding on to that will just make it worse for you.
What you want to do is sit up, heels down as firmly as you can push them, bring your shoulders up and stare straight ahead. Your arse must be in the saddle; shoulders must be up. If they aren't, you're screwed. Have you ever seen a western rider? They sit different to how an English rider sits, they tend to have their feet slightly in front of them, pushing into the stirrups, with their shoulders slightly back and their butt practically glued to the saddle. In a buck, try to sit like this. You aren't getting points for how pretty you are, and in a buck, this position will help you more than the classical English position.
Once you are sitting up you need to do another thing that is totally against what you would like to do. You need to make the horse move, which is done by kicking it. But, you also need to bring his head up. You don't get points for kindness either. Drag on the reins if you need to. He is the one bucking and a little bit of mouth pain is no less than what he deserves. Of course, be wary of the type of bit you have, and don't go hauling on something too dreadfully evil. As you pull on the reins to lift his head, kick him. You are practically asking him to stop and start at the same time, but that doesn't matter. You want his head up and you want him to move. While a horse can buck then run, he cannot buck and run. By ordering a run, you'll eliminate all bucks.
As you kick sit down heavily in the saddle. This will both make it more difficult for the horse to buck again because of the added weight at the back of the saddle as well as make it more difficult for him to unseat you should he ignore you and buck again. Once the horse is going it is up to you what you do next. You can make him run a few steps, then bring him to a walk (recommended if you are shaken and need to take a breather) or you can make him keep on running. The latter is more recommended than the former. The horse tried to get out of doing work (more reasons why they buck below), so his punishment and training is doing the work you asked originally that made him buck.
Once you think he has done enough of whatever you demanded before the bucking, you can bring him to a walk or a trot and maybe let him relax a little. Bucking is very strenuous and he'll probably need a short break. Then, ask him to do the work again. If he bucks, repeat everything above, once it is over ask him again. It doesn't matter if you work him for several hours like this, if he still has the energy to buck he has the energy to work. If he is shaking and sweaty then stop. Obviously don't work him to the ground. Am I a bit cruel? Yes. But letting a horse out of work because he is "tired" (the horse won't pretend but there are a lot of stupid horse owners out there who don't know what a really tired horse looks like) won't train him out of bucking.
If you fall off a horse that is bucking most likely it will be over one of the shoulders. Depending on your horse, he will stop and stare at you, run away in sudden fear of this human on the ground, or not notice your fall and just keep running. The good thing about falling over the shoulder is that you'll fall out of the horse's pathway. He'll probably stop running after a bit, and he might stop and feel a bit stupid. Approach him carefully. Please, please try not to land on your back or neck. Try to roll as you fall. Always ride in a helmet.
The most important thing is to get back on and ride him through a walk, trot and canter again until he doesn't buck. Of course, this is easier said than done. If you get nervous and feel that you can't control the horse while he is bucking, get an instructor of knowledgeable friend to help you. If you are mostly nervous about falling off, get a stock saddle, which has knee pad that sits against your thigh. It is nigh impossible to fall out of one of these saddles. They are expensive, but so is a broken leg.
Horses are most likely to buck into a canter. Generally this will be a small buck of happiness commonly called a "bunny hop", which is a weird half buck-rear thing that is in word fun because you can feel that the horse is happy. Fun, of course, until it gets big and repetitive and someone gets hurt. Ride a bunny hop the same way you do a buck, and urge the horse on.
Then you get the horses like my Rose, who would buck into the canter for a million different reasons. The number one reason is lack of impulsion. The horse needs forwardness to canter so that he can stay in balance, without the right level of impulsion the horse will get his legs tangled and he'll stumble. This is very simple to fix. Before you ask for a canter, make the horse so forward in his trot that he is practically begging to be allowed to canter, his legs can't go this fast in a mere trot. When I was first trying to get Rose out of her bucking habits I stopped asking for a canter, I would simply trot fast until she was nearly falling over from the speed. When a horse is begging you to change paces you know. All it took was a slight shift in my seat and legs as outlined in the canter node, and she would canter happily with no bucks.
Sometimes she would buck because she didn't want to canter. Lazy bugger. If this is your horse, do the fast trot thing outlined above, and if you need to, get a whip and crack it on their shoulder just after you kick. The timing is important here, if you kick and the horse has said, yep, I'll canter, he'll get annoyed at the whip. If you have kicked, he has decided, no, I shan't canter, and you don't use the whip very quickly, you'll have lost again. Normally the whip is used on the flank but with a horse that bucks, that might be all the encouragement he needs to lift of. Don't use a dressage whip on a horse that bucks until you know him well. They are long and can irritate the horse very easily.
Sometimes a buck happens because of a shy, and shying comes from fear. The horse will run away from whatever it was, trying to buck. Right now, all you care about is making him keep going. If you were walking calmly past something and then the horse shied and fled bucking, keep the horse running, just stop the bucks. Sit down, bring his head up and kick him on. Once he has done even one stride of run without buck, pull him down to a walk or trot. Talk to him and stroke his neck. Walk him in a small circle where he cannot see what he was afraid of.
Horses are funny things; I knew a horse who would walk past a chair calmly if it was on his right, but was soon as you turned him around and made him walk past it with the chair on his left, he was outta there. Walk your horse toward the scary thing and then before you reach it and before the horse gets nervous again, walk him away. Do this for a while, each time getting a few inches closer to the thing. If you are nervous or your horse is dismount and walk him towards it. Don't get angry with a horse who was afraid of something. Horses are very timid creatures and you'll be the only one they can lean on for comfort in this particular situation. If you were riding him towards a jump when he shied, walk him around the jump and if you can, lower it so that he can walk over it.
Horses rarely buck when you are on the ground next to them, most often it is a rear. If it does happen, a sharp yell and a pull on the rope will probably sort it out. Just make sure you don't get run over should he come down running.
Once you know your horse well you will be able to predict where and when the horse is about to buck. If you think it will help (and mostly it does) lunge your horse for twenty or so minutes before you ride. If you don't know how to lunge, if you have access to a round pen or other small enclosure, get a whip and let your horse loose in there. Make him work through his paces until he seems settled enough to be ridden. Even if this takes 40 minutes, get on him and work him through his paces on both sides.
Bucks are very dangerous. If you don't train a horse to stop bucking, he will turn into something approaching a rodeo horse. If he gets away with bucking his attitude towards you will change both mounted and on the ground. He will become pushy and dangerous. Don't be afraid to step back and ask for help. Knowing your limitations is the best way to learn more.