dude, you do know this is different for every state but here it is from my state SC
Whenever a person driving a vehicle approaches a railroad crossing and there is a signal indicating an approaching train, the driver must stop within 50 feet, but not less than 15 feet, from the nearest rail of the railroad and must not proceed until he or she can do so safely.