To be safe when crossing a railroad, you should:

Railroad crossings are always dangerous. Drivers should look and listen for an approaching train coming from either direction before proceeding across the tracks. Watch for signals indicating an approaching train and never proceed until you are certain it is safe to do so.
DMV Writen Test Logo