The samurai (or bushi) were Japanese warriors. They were members of the important military class before Japanese society changed in 1868.
The word samurai comes from the Japanese verb saburai, which means to serve (someone).
The samurai first became important in the Warring States period (467-1573). At that time, there were many independent areas in Japan. Those areas fought each other all the time, so Japan needed many samurai. Many of the famous samurai movies by Akira Kurosawa were about this time.
In the 12th century, two military clans, the Minamoto and the Taira, were very powerful. They controlled much of Japan. They fought wars against each other. In 1192, Minamoto no Yoritomo became the first shogun. He became the ruler of all of Japan. He started a new government in Kamakura. That government made the samurai the ruling class of Japanese society.
A samurai believed that his swords held his soul. That made the sword the most important thing he had.