Sam lives at No. 3 Bagshot Row with his father, Hamfast Gamgee, a.k.a. the Gaffer.
The Gaffer was Bilbo Baggins gardener at Bag End when Sam was a child, and now Sam is Frodo's gardener.
Sam overhears Frodo speaking to Gandalf about the One Ring.
Gandalf insists that Sam accompany Frodo on his adventures, and Sam agrees readily.
Unbeknownst to Frodo, Sam has actually been spying on Frodo for months before getting caught eavesdropping like this.
Merry and Pippin, suspecting that Frodo might be planning to leave the Shire, have brought Sam into their conspiracy to go with him, if he does decide to leave.
Sam readily participates in this plot because, like Merry and Pippin, he loves Frodo.
So when Frodo and Sam leave the Shire on September 22nd and travel to Frodo's decoy house at Crickhollow (where he is pretending to move before secretly sneaking out of the Shire entirely), Sam is not surprised to find Merry, Pippin, and Fatty Bolger waiting for them.
Merry and Pippin explain to Frodo that they will not be left behind.
Sam, Frodo, Merry, and Pippin all set out to the Old Forest.
When they face Old Man Willow, Sam tries to help Frodo pull his cousins from the evil tree's roots.
Sam, along with Merry and Pippin, is unconscious and with a ghostly sword at his throat, when Frodo wakes up in the Barrow-downs and calls on Tom Bombadil to save them from the Barrow-wights.
When Frodo is injured and brought to Rivendell, Sam sits by him day and night until he wakes up.
Frodo announces that he is going to take the Ring into Mordor, and Sam insists that he has to go, too.
Elrond teases Sam: certainly, Sam shall have to go, since he can't even be separated from Frodo for long enough to let Frodo go to a Council to which Sam is not invited.
The Fellowship sets out from Rivendell with one pack-pony, Bill, who the Hobbits bought from Bill Ferny in Bree.
Sam has grown deeply attached to Bill the pony, which is why it makes him sad that they have to leave Bill behind when they go into the Mines of Moria.
Once the Fellowship reaches Lothlórien, Galadriel shows her Mirror to Sam and Frodo. In it, Sam sees Bagshot Row getting torn up, leaving his poor elderly father homeless.
Even though Sam believes that this vision is probably true, he still chooses to continue on with Frodo.
Galadriel gives Sam a box of earth from her garden, with a little silver nut. When Sam returns to the Shire, he can use this earth to make his garden bloom. Again, Sam is associated with nature and love of living things.
At Amon Hen, when Boromir tries to take the Ring, Sam is the only member of the Fellowship who guesses what Frodo is going to do next.
When Frodo tries to slip away from the rest of the Fellowship to go into Mordor by himself, Sam follows him.
He wades into the River Anduin after Frodo, even though he can't swim.
Frodo fishes his gardener out of the river, and the two cross the river together.
Even though Frodo was trying to protect Sam by leaving him behind, he cannot deny that he is glad to have Sam's company on this journey.