A rōnin was a samurai without a lord or master during the feudal period (1185–1868) of Japan. A samurai became masterless upon the death of his master or after the loss of his master's favor or privilege.

In modern Japanese usage, sometimes the term is used to describe a salaryman who is unemployed or a secondary school graduate who has not yet been admitted to the university.

The word rōnin literally means "wave man". It is an idiomatic expression for "vagrant" or "wandering man", someone who finds the way without belonging to one place. The term originated in the Nara and Heian periods when it referred to a serf who had fled or deserted his master's land. In medieval times, the Ronin were depicted as the shadows of samurai, master-less and less honorable. It then came to be used for a samurai who had no master (hence the term "wave man" illustrating one who is socially adrift).

More Info: en.wikipedia.org