Since you asked about all of the big engine burns, including those starting on the ground, this would cover the Saturn V launch vehicle as well as the Apollo spacecraft.
The Saturn Instrument Unit (IU) housed its own guidance system completely separate from that on Apollo, though the Apollo guidance system could take over if the Saturn's failed. (Only one guidance failure occurred in the launch phase of an Apollo/Saturn flight, and it occurred "the other way"; Apollo 12's spacecraft guidance system momentarily lost power and "tumbled" due to two lightning strikes right after liftoff, but the guidance system in the Saturn V was unaffected. Otherwise the mission would certainly have been aborted.)
The IU follows several guidance algorithms during the launch phase. Because much of first stage flight takes place through the atmosphere, special rules apply that are quite different from those in use during powered flight in the vacuum of space. For one thing, the "angle of attack" -- the relative direction of the wind past the launch vehicle -- must be kept very small or the aerodynamic forces will rip the entire stack apart. Outside the atmosphere, angle of attack is irrelevant.
Also, the vehicle accelerates so quickly, reaching Mach 1 only about 60 seconds after launch, that drag minimization is a major factor in optimizing the launch trajectory. This requires a "lofted" trajectory that would be unnecessarily inefficient if an atmosphere weren't present (e.g., when launching from the moon). There may be other considerations such as avoiding hazards to coastal cities and offshore oil platforms, and making it possible to recover from an engine failure (as the recent Falcon 9 flight just did.) For these reasons, the Saturn first stage (and even most first stages today) fly a pre-programmed trajectory carefully designed and optimized ahead of time on the ground.
Special care has to be taken during staging so that no sudden steering commands will cause the stages to hit each other after separation.
Only after the rocket has left most of the atmosphere and staged is "closed loop" guidance usually initiated. Then the onboard system continuously computes, in real time, the most efficient trajectory from where it actually is to where it wants to be.