Thanks Glom (edit: and Andromeda, posting while I typed )
Oops, I also forgot about the changing gravitational field. Is that a large or small effect on a launch?
Relatively small for a low earth orbit, but not negligible. Much more significant for higher orbits including trans-lunar ones. But still, the balance point between Earth and Lunar gravity is something like 85% of the way to the Moon.
I'm sure it's calculated in a launch, but due to air resistance and so forth, does the rocket get shut down at a certain speed or is it all precalculated and shut down after a certain time?
This is somewhat complicated and I'm probably not the best person to answer. For one thing, it varies from one launch profile, type of launcher, and mission to another. All rockets include on-board guidance, if for no other reason than to keep the engine pointing in the proper direction. That guidance system is programmed to make the vehicle follow a particular pre-planned trajectory that takes it from the ground to some desired final state. There are various things that can be controlled, depending on the design of the launcher, but the most common are the engine gimbaling (direction of thrust) and burn duration (for liquid fueled engines). Some older designs (like the V-2) included vanes in the exhaust to vector the thrust rather than engine gimbaling. Some engines also include throttling capability (as mentioned above) but most large engines do not. Some thrust control is provided by having multiple engines that can be shut down independently, as previously mentioned.
Besides the on-board systems, space launches have ground controllers who monitor the path of the vehicle and telemetry from the on-board systems. The controllers can't do much to correct major malfunctions but can destroy the vehicle if it deviates too much from its planned trajectory. This is the responsibility of the "range safety officer".
So your simple question -- does a launcher shut down at a particular time or a specific speed? -- has no universal answer. It shuts down when it has achieved its intended terminal state (the proper orbit, for example). This can sometimes take a rather bizarre form if things don't go quite as planned. The second launch of a full-up Saturn V experienced some engine failures and other problems, yet it still managed to enter the proper orbit... but it was thrusting
backwards when it did!