you can usually transfer from one train for another for free if it’s within 2-3 hours of when you got on (depending on location)
with occasional exceptions! here in Chicago we have two separate train systems and you can’t transfer from either to the other :3