If you're playing as Sonic, you'll need to clear a couple of stages first to reach the train station—typically Casino Highway or Emerald Coast.
Once you've beaten the required level, the path to the station opens up. It's been a while for many players, so if the exact trigger feels fuzzy, replaying those stages is the reliable way to progress.