It could be blocked by another train, by road traffic crossing the line or by people carrying out repairs. Occasionally its because the signal (light) itself is not operating correctly and they fail safe so therefore stop trains. So just to be clear the red light means the driver must stop the train at the light.