When approaching a railroad crossing, you should:

When you see any signs indicating a nearby railroad crossing, you should slow down, look for a train, and be ready to stop. If the red warning lights are flashing or the gate is down, you must stop 15 to 50 feet before the railroad tracks. Do not try to go around the gate.
DMV Writen Test