The short answer to your question is that transit police do everything the regular police do, but in a specialized environment (just like campus police!) I don't know about railroad police. I will talk about airport police and city transit (bus) police.
Transit police are primarily tasked with protecting transit property, employees, customers, and others on transit property. This would include buses, as well as the transit stations. In cities that have commuter rail, it would include those facilities. So, you could be riding trains or buses, driving a vehicle patrol and responding to calls at transit facilities or to help a driver with an unruly passenger, or even have a foot or bike patrol assignment.
I worked at the San Antonio Airport. It was pretty boring, most of the time. That means, it was peaceful, and we did not have a lot of police activity. Some of what we did would be considered "security." We did a lot of traffic control. And a lot of foot patrol. The types of calls we would get would vary. Some examples:
- An aircraft emergency landing because the plane hit turbulence and 22 people needed medical treatment. But, it was an international flight, and the pilot was not allowed to open the door unless Customs was there. Our Customs office was closed, with no agents on premises. (a quick phone call resulted in verbal authorization to proceed with emergency services.) This took 3 hours, as they all came off on backboards, and planes are really cramped!
- A guy who went through a security door and boarded an aircraft, locking himself in the bathroom.
- A guy who threatened to kill the President. (this of course resulted in calling in Secret Service).
- Narcotics trafficking arrests.
- Various weapons arrests, usually from things found by the TSA inspectors.
- Domestic disputes. Couples who were not getting along. One would grab the child and try to fly out. The other would try to stop them.
- Traffic Accidents
- DWI, disturbances, etc.
- Crowd control
- Dignitary protection, escorting protected witnesses, etc.
- Handling mentally ill persons, including doing "emergency detentions" to get them the evaluations and care they needed.
It was fun, especially getting to drive on the airfield and talk to the tower! If we were patrolling the terminals, we'd visit with employees and the travelers. You met someone different every day!
Let me know if you have any more questions!