In the Lord of the Rings, Gollum is the main antagonist. He was born in Mordor and was held captive for an unknown time. During this time, he has grown accustomed to the dark and damp conditions. He has become so fearful of the Dark Lord that he cannot shake it when he tries to escape the land of Mordor. He is the first to be defeated by the evil dwarves, but is eventually sent back to Mordor to make his way to the safety of his home.
After his exile, he adjusts to life in the wild and follows the Great River northward. He starts wearing his One Ring to catch fish and eat them raw. After a while, he branches off and follows a tributary of the river from the Misty Mountains. Throughout the journey, he worms his way through the dark passages of the mountain. While walking through these passages, Gollum finds his lost Ring.
Although Gollum's first appearance is a bit gloomy, the character's demise in the film is hardly tragic. The hobbits are rescued from Mirkwood by elves who follow his trail south through the woods. Later on, he decides to go out in search of the Ring. Initially, he finds no success, but eventually finds his way back through abandoned Moria.