Clockwork means, literally, "working like a clock"—that much is obvious! But most modern clocks are electronic: powered by electricity and regulated by quartz crystals, they have relatively few moving parts. If you want to understand clockwork, you need to understand how clocks used to work in the days when you wound them with a key. Like an old-fashioned clock, a clockwork device is completely mechanical and has these essential parts:
A key (or crown) you wind to add energy.
A spiral spring to store the energy you add with the key. (Pendulum clocks store energy with weights that rise and fall, but other clocks and windup wristwatches use springs instead.)
A set of gears through which the spring's energy is released. The gears control how quickly (or slowly) a clockwork machine can do things, but they also control how much force it can produce (for climbing inclines, perhaps).
A mechanism the gears drive that makes the device do useful or interesting things. In a clock, the mechanism is the set of hands that sweep around the dial to tell you the time. In a clockwork car, the gears would drive the wheels that power it over your floor.
If you wind up a clockwork car as much as you can, then let the key go, without putting the car on the ground, you'll hear the gears inside the mechanism screech and squeal as the spring releases its energy amazingly quickly. Since there's very little resistance except friction (the rubbing force between touching surfaces) in the gearbox, there's nothing really for the mechanism to work against and it can deliver energy very fast. Put it on a rug and the energy is delivered much more slowly (and quietly). Now the spring has to work against the resistance of the fabric, which works like a brake on the wheels and the gears that power them.
When you're designing clockwork toys and other devices, you always need to take into account what they're actually going to do (the surfaces they'll work on, for example, and how much force they need to produce through their gears to make their own parts move smoothly). Then you have to choose a spring that can store enough energy to keep the mechanism working for a while, and gears that can produce the right amount of torque (turning force) to do something useful. Real cars have gearboxes so they can produce more force or speed to suit the driving conditions (starting from standstill or racing down the highway), and large fuel tanks so they can do that for a decent amount of time; exactly the same principle applies to toy cars (and other clockwork mechanisms).