The cattle would be brought to the railroad. Railroad would ship cattle to the east.
Bring cattle to the railroad would be called a cattle drive.
(Make sure and eat some good grub on the chuck wagon.)
Later spur lines would bring the trains, closer to the cattle, and the drives would be shorter.
A great western writer is name Louis La'Loumour. (Fiction stories, but utterly amazing.)