That results in very little friction created when compared to an automobile with rubber tires on asphalt or concrete. The fastest method is to call the local police or 911. Tell them the location, generally the name of the road intersecting the tracks or the nearest town, and they will contact the railroad. The railroad dispatcher can reach the locomotive engineers by radio and they will do everything possible to get any approaching trains stopped in time. Don't try to flag down the train.
Most engineers can effectively see about a half-mile ahead of their train.
There's not enough time to stop by the time they see you flagging them down. Flat spots on rail car wheels cause a loud banging noise. Flat spots on rail wheels are quite common and are caused when the wheels end up sliding on the rails for various reasons. Generally, there is no cause for alarm. It's like an automobile tire that wears unevenly, but isn't replaced until tread depth is reduced to a certain point.