Smeagol was a Hobbit, until one day while fishing with his friend, Deagol, he fell into the water and found a ring. Unaware of the Ring's evil, Deagol and Smeagol fought over it, ending in Deagol's death by Smeagol's hand,driven by the Ring. As soon as he put on the Ring, he was a slave to it. The Ring granted him unnatural long life, and as time went on, Smeagol appearance changed. He became thin, bald, and beyond any recognition of what he once was, living off of fish and other creatures developing an alternate dark personality, Gollum.
Years later,While living in a cave, he was found by Bilbo Baggins, who was lost and found the Ring before Gollum had found him. Gollum decided to play a game of Riddles with the Hobbit. If Bilbo won, he would be shown the way out, and if he lost, Bilbo would be eaten. Bilbo won the game and discovered the Ring's power of invisibility. Gollum, infuriated by losing his "precious", looked for the Hobbit, which lead Bilbo out of the cave.
As time went, Sauron's forces found Gollum, and tortured him until he gave them the bearer of the Ring and its location. After which, he was released. Gollum followed the Fellowship from afar through Moria and the Great River, knowing one of the Hobbits had the Ring. As the Fellowship disbanded and Frodo Baggins and his friend Samwise Gamgee, went on their way to Mount Doom to destroy the Ring. Knowing they are being followed they catch him. Frodo, taking pity on Gollum, decided to have them be their guide to Mordor after swearing an oath to the Ring (though Sam does not trust Gollum one bit).
Realizing that the path to Mordor could not be so direct, as they would be captured, Gollum suggested an alternate route by Minas Morgul. Smeagol begins to conflict with his other self, having an argument with himself, in which Smeagol comes out the victor and the dominant persona. When Sam, Frodo and Smeagol are captured by Faramir and his men, Gollum returns after Smeagol is lead to believe that Frodo betrayed him. Gollum's goal again becomes to only reclaim the Ring for himself. After being freed by Faramir, Gollum leads them to the secret tunnel, which the Hobbits are unaware that the path is also the home of Shelob, the giant spider.
After the Hobbits fight off Shelob, Gollum continued to follow the Hobbits to Mount Doom, making a final attempt to claim the Ring. Frodo is about to throw the Ring into the Crack of Doom, when Frodo finally gives in to the Ring's evil, but Gollum struggles to fight for his "precious", biting off Frodo's finger to get it. Gollum jumps in triumph and in his celebration, stumbles over the edge and into the fires of Mount Doom while holding the Ring, destroying it and ending the quest.