Unless they've already been convicted in the past, that is a misdemeanor.
The railroad example is more interesting, though I can't find anything truly on point. All the legislation I have seen suggests you'd 1) have to intend to disrupt the service, and 2) put something on or near the tracks. I couldn't find anything even hinting that delaying a train through normal passenger controls constituted interference with a railroad.
Even if those were all felonies, I think most people don't even lead that exciting an existence :).
Very often the conductor will let you board a train late by signalling you with hand or speaking... But disobeying the conductor's signal whistle is where you step into potential illegality, because the train might (and sometimes really will) start moving that same moment.
All of this doesn't apply to city public transport - trams, metro etc. But it does apply to trains passing through the city.