Is this for Driver's Ed? If so, here's my answer:
There is always a double-cross, or white x, sign before the crossing and/or a white x painted on the road to warn you of the upcoming railroad crossing.
If there are warning lights and/or arms at the crossing, you: turn off your radio and roll down the window to listen for the train. If the lights are flashing and/or the arms are down, a train is coming. If not, there is no train coming. You must stop before the white line, look both ways down the track. You are free to cross when the arms are all the way back up and there are no lights flashing AFTER you look both ways while listening for the train.
If there are no warning lights or arms at the crossing, you: stop before the white line, turn off the radio, and roll down the window to listen for a train. As you are stopped, you look both ways down the track. If you can't hear or see the train, you are free to cross. Make sure to keep at least 3 feet of distance between you and the track. However, to insure that nothing will come up and hit your car, you can always stop a good distance away from the white line, but still make sure you can see down the track.
This is very long-winded, but you can condense it.