In my perception, by predetermining speed, distance and other parameters including a rocket's thrust and mass, a trajectory could be calculated ahead of time.
The short answer to your question is GNC (Guidance, Navigation & Control). Mission planning is done based on nominal (normal) performance of all systems launched through a mean atmosphere for the time of year when launch will take place. Depending on how many prior flights have taken place and how much data is available to model a specific vehicle launch the planning can get very close to what actual flight conditions will be for a normal launch.
For the actual launch GNC is basically a interdependent set of systems to ensure any small corrections needed to make the vehicle hit its main engine cut-off targets (velocity, altitude, flight-path, etc..) are made when needed. Think of GNC as a 3-legged stool that gets you there. In short:
- Guidance - tells you where you want to be at any particular time (target altitude, velocity, flight-path),
- Navigation - tells you where you are (how far away from where guidance tells you you should be),
- Control - is the physical inputs that correct the difference between where Nav tells you you are and where Guidance tells you you want to be. (the inputs can be throttle position, engine gimbal angle, etc.. to correct the difference)
This process is automated and generally takes place within an on-board set of instruments/computers. For manned flight, it's not a whole lot different than the sophisticated Flight Management computers that get airliners from place-to-place within the atmosphere. The pilot and commander basically monitor the systems and only intervene if things go so badly wrong that GNC cannot accommodate. For unmanned flight, the system is essentially the same, but the people monitoring and who must be ready to take control are on the ground.
That's it in a nut-shell. Guidance will hold the flight-design parameters (altitude, velocity, attitude) for each moment in time during launch. Inertial Measurements, RADAR, and Flight Instruments arrive at what the actual altitude, velocity and attitude are at each moment. And Control, that pre-programmed set of responses make inputs to steer the vehicle to eliminate (actually minimize) the differences between where you are and where you want to be. That continues until main engine cut-off.
From there any lingering corrections needed are made through orbit correction burns -- but the exciting part of GNC is over until you decide to come home.