The riff for this song is something Steve Vai came up with for the movie Crossroads (not the one with Britney Spears - this was the 1986 film starring Ralph Macchio). In the film, Vai's character engages in a climactic guitar duel with Macchio's guitar-slinger. The script called for Vai to play a locomotive-like guitar part to intimidate Macchio's character, so Vai had to come up with something for the film. He tuned down his guitar and developed the chugga-chugga riff thinking about the heavy metal of a train coming through.
It was a high point of the film, but Vai didn't turn it into a full-length song until nine years later. In our interview with Vai, he told us how it happened: "One night, I had this bizarre dream where I was on this giant metal horse and we were running through this field. This train was chasing us, and you know when you're in a field of grass, you don't know where the tracks are? So every place you turn, the train was following. So then I decided to turn the horse around and go directly at the front of the train, and that's when I woke up, before we collided. That's when I said, 'OK, I've got to write a song about this.'"
Vai pushed the wah-wah pedal to its limits on this track, not only earning him the #7 spot on Guitar World's 2015 list of greatest wah solos of all time, but also inspiring the Steve Vai Bad Horsie Wah pedal by Morley.