So...how do railroads work?

By federal law, Amtrak – and all passenger trains – have right-of-way, regardless of whether an Amtrak train is running on Amtrak-owned track, or on a freight railroad’s track.

However, as @msmith537 notes, this is effectively “in theory,” because the freight railroads may or may not actually give Amtrak’s trains preferential use of their tracks, and the law is rarely actually enforced.