Before a space agency lets any transportation workers even touch a spacecraft, they have to make sure it won't hurt anyone or cause a national security incident. So engineers carefully scour the craft and remove and replace certain parts.
Hazardous materials are among the first to go. They drain fuels and lubricants and pull the associated tanks, too. Gas-related systems, like oxygen tanks, must be taken out as well.
Security issues are also a concern. Engineers remove high-tech items too classified for the public eye.
And workers often strip out parts that are still usable in other craft. After doing so, they may replace those components with replicas so that viewers get a sense for what the ship really looked like.
For the space shuttles, entire sections of the crafts were eviscerated for reasons other than safety. Engineers wanted to examine how years of spaceflight had affected various systems. For example, they removed and dismantled the engines to understand how well they endured their workloads. They even took out the windows to better see how the materials had fared.
Once a craft finally gets the green light for transport, well, you can't use a Star Trek transporter to magically whisk a spacecraft from a landing field to a museum. And when you're talking about moving a hulking, massive spaceship from Point A to Point B, things can get tricky in a hurry.
It all depends on size and transportation options. The Smithsonian and National Museum of the United States Air Force, for example, are adjacent to active landing strips, meaning that larger craft can just land nearby and then taxi directly into display hangars.
With smaller craft, it's sometimes possible to partially disassemble them and then transport them via highway. In these situations, a transport company (such as a trucking company) works directly with the space agency to understand the weight and size of the parts that need to be moved. Then the trucking crew works out the logistics of getting each section of the craft to its final destination.
Keep reading and you'll see more about how spaceships navigate their way to museums. Sometimes, that process involves tight turns, crazy politics and a whole lot of cash.