How Railways Work