When approaching a railroad crossing, you should:

Reduce your speed as you approach a railroad crossing. Remember that you will not necessarily be able to hear a train, and don't assume that signals will warn you of its approach. Never try to outdrive an approaching train at a railroad crossing.
DMV Writen Test