Like his beloved master Frodo, Sam develops over the course of the novel. While his defining qualities of loyalty, humility, and down-to-earth hobbit sense remain constant, the events of the quest reveal his own courage and heroism, as well.
During The Fellowship of the Ring, Sam exemplifies the virtues of a good servant in a class-conscious society: competent and conscientious about his work and quick to defend his master against any threat, real or imagined. Sam's unhesitating devotion to his employer — readily identified in the novel as love — may seem strange or even unbelievable. Many critics have pointed out that the relationship Tolkien describes is less that of a hired hand to his employer than that of military aide to his officer; a much more intense personal bond that develops in the field. Sam's delight in stories about elves gives him a childlike quality that can be read as condescending, but it also allows him to express the reader's own wonder and delight at the world Tolkien describes.
After the breaking of the Fellowship, Sam gradually becomes the focus of the narrative. As Frodo becomes more absorbed in the Ring, which removes him from the real world, Sam's perspective remains one with which the reader can identify. Along with the narrative focus, Sam gains authority and confidence. He takes the Ring and the quest on himself when he believes Frodo is dead, and he rescues Frodo from the orc tower when he learns his master lives. In the final push to the mountain, Sam provides the motivation — even to the point of carrying Frodo. Back in the Shire, Sam becomes a hero of the Scouring while Frodo fades into the background. Even more than his master, who, after all, comes from the rich landed class, Sam represents the common man, more heroic than he believes himself to be.