In general, tracking error comes from two sources: changes in the reference input and the onset of disturbances. As you will recall from your continuous control course, system Type determines steady-state behavior,
Type 0. Finite steady-state error when setpoint is a constant position (step input).
Type 1. Finite steady-state error when setpoint is a constant velocity (ramp input), and zero error when setpoint is constant position.
Type 2. Finite steady-state error when setpoint is a constant acceleration (parabolic input), and zero error when setpoint is constant velocity or position.
The figure below shows the output, $y$, and error, $e$, for different types of systems and different inputs. Change the input Type and observe the corresponding responses for different types of inputs. Note when the error, $e$, over time is zero, constant or growing.