First, collect all seven Chaos Emeralds. Then finish the final story chapter, which unlocks Super Sonic and Super Shadow as playable characters.
Pick either one, gather at least fifty rings, and jump while pressing X to trigger the transformation. Keep an eye on that ring count — the form drains rings while it is active.