Each step on the escalator parts has two sets of wheels that rotate along two separate tracks. The upper unit (the wheel near the top of the step) is connected to the rotating chain and is pulled by the drive gear located on the top of the escalator. The wheels of the other groups simply slide along the track, following the wheels of the first group.
The two tracks are separated from each other, which keeps each step horizontal. At the top and bottom of the escalator, the track is horizontal, which flattens the steps. There is a series of grooves inside each escalator step to connect with the front and back steps during the flattening process.