Sorry, I couldn't resist
There are a lot of ways that this is done. In simplest terms, most systems make use of a dog and knife idea. A
deck of a few inches high is built up over the entire
stage, and then aircraft cable (connected to an automated or
manual winch) is run underneath it through a series of sheaves. The aircraft cable forms a complete loop (to allow the scenery to travel in both directions) and where it meets is something called a "dog". The dog is a low-friction piece of equipment that can accept a knife being slid into it from the top. The knife is a piece of metal that attaches to the scenery and into the dog through a narrow slit cut into the
deck, and is usually removable so that the scenery is not permanently attached to the
deck. When you move the
winch, the aircraft cable moves under the
deck, and the dog moves along with it. In order to put scenery into the
system, you just place the scenery above the dog, slide the knife through the scenery and into the dog, and the movement of the dog will now take the scenery with it.
It's pretty simple in concept, but quite difficult and expensive to execute. For one, you need to be able to
deck up the entire playing area and offstage space - basically, you're raising the entire
stage level a few inches. You also need access to sheaves and aircraft cables and dogs, and for anything of significant size, you'll need an automated
winch as well. Hand-crank winches can be used for smaller, lighter pieces, but even those are expensive and hard to come by. It requires a lot of planning to get everything to
line up, as you need to make sure your
deck slit is in the right place and lined up, and that there is enough room under the
deck for the aircraft cable to run freely. This is all just for a single straight
track - once you start talking about multiple tracks or curved tracks or turtles, it gets way more complicated. There are other ways to do this, including ways that don't require the whole
stage to be decked up, but this is kind of the "standard" approach.