Buses, maybe. Trains: Nope. Doors are locked from the inside, usually aren't accessible while moving and even someone would get inside, well, you can't get off the tracks. You'll get a red signal and a forced braking shortly afterwards. It's really, REALLY hard (by design) to wreck something on purpose with a modern high speed train.
Which wasn't a hostage situation or a hijacking to get elsewhere, and it has nothing to do with the passenger security theater which is what this thread is about...