At the end of Return of the King, Gandalf, Frodo and Bilbo don't go on that boat to die.
When the volcano blows up, the ring doesn't melt and shoots out of the volcano!
Another hobbit finds it a hundred years later and it turns him evil. It possesses him, gives him wisdom and he changes form just like Golem.
He makes a whole war to destroy the world.
Gandalf goes and tells some of the hobbits that they need someone to go on an adventure to fight the army.