I'm assuming you're playing the 16-bit original title. From the Sonic the Hedgehog manual:
If you collect a certain amount of Rings, you can warp to the Secret Zone where you'll ricochet off multi-colored blocks in a 360° rotating maze! There are six Secret Zones. In each Zone, your goal is to touch the Chaos Emerald.
In other words, if you have 50 rings as you pass the signpost at the end of an Act, you can jump into a giant warp ring which will take you to a Special Stage, in which you need to maneuver toward the Chaos Emerald while avoiding "Goal" blocks.