An escalator has a fixed number of visible steps, N, the length of the moving staircase measured in steps. When you walk on it, you cover part of that length with your own feet and the escalator covers the rest by carrying you. Every escalator question rests on that split.
Walking with it: N = (your speed + escalator speed) × time
Walking against it: N = (your speed − escalator speed) × time
Speeds are usually given in steps per second. This is the same structure as boats and streams: the escalator is the current. It is also a case of relative speed, where speeds in the same direction add and speeds in opposite directions subtract.
Worked example 1: standing still
An escalator has 60 visible steps and moves at 2 steps per second. Standing on it, you reach the top in 60 ÷ 2 = 30 seconds.