By destroying it.
There was one ring ring created by Sauron. The ring was the Ring of Power. The ring Sauron created was to achieve his purpose.The ring of power was the great weakening of his power. He also lost this ring many ages ago.
Sauron
Gollum took it from him and Frodo pushed him into Mt Doom
the one ring belonged to Sauron, the great. He made it
The One Ring - the ring made covertly by Sauron to rule all the Rings of Power.
My guess is that he would have left the cave, but one of Sauron's minons would have taken the ring and given it back to Sauron.
He used to possess the one ring of Sauron, which he called his precioussss.
The ring has a consciousness of its own. The ring knew that Frodo was going to take it to be destroyed, whereas the one ring abandoned Gollum as it knew that Gollum would never return it to Sauron. The ring used Bilbo as a carrier or a vector.
In The Hobbit the ring's only power is that it makes its bearer invisible.
He did not HAVE to - the Ring had power of its own, just like the other Rings of Power. But Sauron poured a trickle of his power in the Dwarves' and Men's Rings, and much of it into the One Ring, so that it could be more powerful than the other Rings and dominate them.
Sauron forged the Nine Rings for Men, the Seven Rings given to the Dwarf Lords, and forged the One Ring by and for himself alone.
The ring was made by Sauron, and when it was made, He put some of his power into it. Sauron was an Maia. Meaning he was one of first people on Arda, part of the Valar. The ring bears some of his life force, and whilst the ring is intact, sauron cannot be killed. The reason they have to travel to Mt. Doom to destroy the ring is because it was forged there and no other thing on arda can damage it Hope this helped