The translation of Samurai is "he who serves"
A Samurai is pledged to a life of Service to his Daimyo (Samurai Lord). Daimyos pay lesser Samurai with land and serfs. The Samurai pay an annual tribute of Ko (a bushal of rice) back to the Daimyo. The Daimyo in terms pays another higher ranking Daimyo usually another intermediary or even Area Governor. This chain continues all the way up to the Shogun (who is the emporors right hand man). Depending the period such as Takigawa the Shogun WAS the power, while the emporer served as a figurehead. However since the emporer is a direct descendant of the goddess Amuratsu the emporers word was law. Not even the Shogun could defy him.
All Samurai serve the Samurai above him. The behavior/honor reflects upon the samurai above and below him. If the Samurai disgraces himself he must commit seppuku (suicide) in order to regain his honor if he doesnt he becomes Ronin along with his retainers. A Ronin, a masterless samurai. this is the scum of Japanese society.
A Samurai who lives while his master dies in battle (unless there was a descendant) also ran the risk of being Ronin. This was the punishment for those who failed their service.