When the 7 chaos emeralds are collected in one place and used the energy released teleports them across great distances via chaos control. This process, while quite random, also makes them remain in the same dimension. This is why the special stages look so different (360 degrees rotate stage, pipeline stage etc). This process leaves a tiny rip in space/time which can be temporarily widened using the power of rings. After a period of time the person who entered the rip is ejected, and the rip closes.