The samurai were, above all things, warriors. Their name comes from the Japanese word "to serve." Their loyal service, as armed supporters of an emperor, a shogun, or of a higher-ranking samurai, was the source of their livelihood, the anchor of their honor, and the outstanding guiding principle of their way of life.
The samurai service was a pyramid of loyalties: the emperor was defended by the highest-ranking, richest samurai, who commanded the service of the next rank down, and so forth for many levels. Japan endured many centuries of internal power struggle, and it was military strength more than anything else that determined who really ruled the country.
The first appearance in the Japanese historical record of some sort elite fighting force is in the NIHONGI, an early 8th century chronicle, which describes a battle in 672 where succession to the imperial throne was won because of mounted archers. The style of fighting was something that only the bravest and best-trained could accomplish.
The archer had to be able to shoot accurately while charging at full speed into the teeth of the enemy, then wheel his horse sharply and retreat to safety to prepare another charge. Obviously this required intense training (both in shooting and riding), well-designed weapons, equally well-designed armor to protect the shooter from being shot, and of course, a horse. This was a specialty. These archers became so highly valued that chronicles of the time record the strength of a fighting force not as the number of warriors overall, but in terms of how many bows there were.
The emperor rewarded those who fought for him: he gave them control of land and the rice it produced. Rice was money. This became the pattern for the next 1,000 years. The victor would redistribute the land of the vanquished, and those who were most important in battle got the most and best spoils.
Some families developed a reputation as warriors, and a style of fighting developed which leveraged that reputation. A samurai would ride forward and loudly shout out his name, his rank and his family's lineage, in an effort to find an opponent of high enough rank to fight. (Reward was based on the importance of the people you killed.) Sometimes he would shout a direct challenge to a specific foe. A samurai arriving at a batvtle would therefore try to find a place where his chances for glory were the greatest. This made strategic, centrally commanded warfare virtually impossible, but it is the stuff from which legends are built.
The obvious way to deal with a mounted archer is to try to get him off his horse and attack him hand-to-hand. Therefore an archer needed a hand-weapon, armor, and supporters to defend him if he was thrown from his horse or taken off it by the enemy. Each samurai went to battle with retainers who would run alongside his horse and do just that.
As the samurai gained in reputation and social stature, the prowess of the individual warrior became more and more important in receiving rewards. The samurai could make his claim for reward by showing his overlord proof of how many enemies he had killed, and what rank they held. His proof was their heads. A vanquished enemy's head was cut off and carried back, and presented after battle. Each head was neatly groomed in an approved manner, and a tag was attached to one ear stating the name and rank of its former owner. The overlord would then view the heads. This evolved into an elaborate ceremony.
The Legend
There is a legend told about one such trophy that has echoes in many other cultures. During the late 14th century, there was an imperial heir hiding out in the southern mountains, in possession of the imperial jewels, laying his own claim to the imperial throne. The shogun Yoshimasa ardently wished to have this "southern court" destroyed and to get back the imperial jewels. He sent members of a warrior clan, the Akamatsu, to the southern court where they put themselves forward as loyal to the pretender.
One night, they murdered their host and made their escape through the snow in two groups. One group carried the jewels, the second group carried their proof-of-success: the pretender's head. While traversing the mountain pass, the second group was attacked by southern court samurai. The Akamatsu quickly buried the head in the snow, intending to dig it up later when it was safe. But while the battle raged, the head revealed itself by sending up a fountain of blood, and the southern court samurai recaptured it. (The jewels got back to Kyoto, though, ending the southern court's last hopes.)
The sword and other hand-weapons soon superceded the bow and arrow as the preferred tools of individual combat. The Japanese sword, in particular, became associated with the samurai mystique. As the samurai was to the common warrior, his sword was to all other swords: the most refined possible example of its kind.
The sword became known as "the soul of the samurai". Samurai trained tirelessly in the use of the sword, beginning in childhood. Young samurai would improve their footwork and timing by hanging small objects at various levels from a tree-branch with string. Then using a wooden or bamboo sword (so as not to slice the strings), they would attempt to touch them all without losing balance.
The curved katana is a slashing weapon (rather than a stabbing weapon) and its classic use has five positions or stances. In the "upper" position, the samurai held the sword overhead, with the blade pointed toward the opponent's eyes, at the ready to deflect the opponent's blade. In the "middle" position, he again held his blade overhead with the intention of striking his opponent's body rather than his blade. In the "lower" position, he held his sword low, below the opponent's sword, prepared to strike the opponent's hands and arms. In the "left" position, the samurai held his sword horizontally to the left side, thus allowing him to deflect the attacking sword from below before slicing before slicing diagonally upward across the opponent's body. In the "right" position, he held his sword horizontally on the right side, with the intention of swinging it into the upper position before slicing downward across the opponent.
From these five stances, an infinite number of variations could be devised. One passage from the Heike Monogatari, the famous chronicle of the Gempei War, describes different sword-moves: zigzag style, interlacing, cross, reversed dragonfly, waterwheel, eight-sides-at-once. The swordsman's trick was to keep his opponent, who was standing a mere sword-length away, unaware of his position. Each fighter attempted to take the "stance of no stance" by moving casually and remaining calm. An expert swordsman might even leave his sword in its scabbard with the intention of using a "quick draw" technique known as iaijutsu, drawing it at the last moment, killing his opponent with a single blow and returning it smoothly to the scabbard.
Swords were prized possessions, and were handed down in families for centuries. The Japanese swordsmith's craft was so highly developed by the time of the Gempei War (late 12th century) that it was changed very little during the following 400 years.
Bow and arrow no longer held the spotlight, but it remained an element of samurai training and warfare. During a battle in the Gempei War, fought in shallow water off the island of Shikoku, one of the Taira tied a fan to the mast of their ship and challenged the Minamoto to shoot it down. His strategy was to goad them into wasting their arrows, but a young Minamoto samurai covered himself in glory by destroying it with his first shot.