In recent years, there has been an in increase in train fatalities. Seven people were hit by trains in the Bay Area within a week, and five of the victims died. It comes down to a number of factors for the cause of these accidents.
Railcars are extremely quiet. They are designed to not cause a lot of friction, and trees serve as a sound barrier. If you are walking on the railroad tracks wearing headphones, then you will not hear the train coming.