When soldiers from the west coast ended up in the east, does that mean they mostly marched across the entire country? How likely was a soldier to have used a horse at some point on the journey?
As far as I can tell, very, very few regiments (if any) raised on the west coast proper ever went east of New Mexico territory. California raised ten regiments and two battalions, and all either served in the Department of the Pacific on garrison duty or fought rebels in Arizona and New Mexico. Oregon and Washington raised only two regiments each, and neither went east of the Rockies.
The midwestern states sent a number of regiments to the east, usually by the expedient of rail. But that doesn't seem to be what you're asking about.
Albert Sidney Johnston was a brigadier general commanding the Department of the Pacific from Alcatraz when news of secession reached California. The Texan resigned his commission in early May and, after some deliberation, Johnston rode east accompanied by a small group of pro-Confederate Angelenos. They dodged Union patrols and hostile Indians for six weeks before reaching safe harbor in Confederate Arizona.
There were two primary methods to go from West to East Coast prior to 1869. One by ship, which was not as often the route taken, or via wagon roads. I've not come across any case where soldiers walked anywhere very far. As u/Rittermeister said, during the war, units typically did not make the journey. But many soldiers stationed in California and other areas did come east to join the effort before the war. (Ex: Albert Sidney Johnston resigned his commission to join the Confederacy. He'd been stationed in California). Whatever the reason, they traveled on horseback or in wagons until reaching a train depot, and road rails the rest of the way.
If you meant in your question how soldiers moved around large areas, they used railroads as often as was feasible, but outside of that, the infantry moved on their feet exclusively. Very few infantry soldiers ever had access to a horse while moving with the army on either side.