Rearing is the "opposite" of bucking. A rearing horse stands up on its hind legs.
Rearing is considered more dangerous than bucking - although a buck is more likely to unseat the rider, a rear is somewhat more likely to end in serious injury to both. A horse that rears with a rider may fall over backwards, landing on the rider.
Like bucking, rearing is often caused by pain - sometimes a horse may rear because his mouth is sore and I once had to deal with a horse rearing, repeatedly, because the saddle was just lightly touching his withers (A change of saddle stopped the behavior instantly). Rearing can also be aggressive behavior. A horse that is seriously attacking a predator or another horse may rear and strike with the front legs. Stallions are more likely to rear than mares or geldings and I've seen a breeding stallion rear simply to impress the mare waiting for him.
Because the rear is so spectacular it's sometimes intentionally taught as a trick (not recommended unless you know what you're doing). Skilled trick horses will rear and even strike on command - and war horses would be taught to do the same thing on the battlefield. The classical dressage movement known as the levade is a highly controlled rear.