Most crossings have signals, with an exception of a few. The signals start ringing a bell and flash red lights when a train is coming to alert cars and people to stop and wait for the train pass. However, the trains are not dangerous as they will stop for anyone/anything on the tracks.
The cars usually stop for the trains when the signals turn on. However, some cars will stop on the tracks and sometimes a car will still be on the tracks when the signals turn on and a train will have to wait for the car to get off. After a while, the signals will turn off.
Not all railroads are in use so not all railroad crossings are. Some crossings have no trains going through and the crossing stays open all the time.