When an expendable booster rocket stage nears the end of its burn, does the guidance computer shut the engine(s) off at a certain velocity/altitude for the mission, or does the stage completely exhaust its propellants?
First stages are generally run to depletion (though not complete depletion - I'll get to that later). First stage ascents often use a preprogrammed, open loop guidance system to get out of the atmosphere with a good chunk of downrange velocity. Because winds aloft and other factors may vary, first stage performance also varies somewhat.
Upper stage guidance is almost always closed loop, targeting a specific position and velocity combination. As a result, upper stages of boosters are shut down when that target is reached, with some amount of reserve propellants left to cover dispersions during ascent and a disposal burn.
Liquid fueled first stages are not run dry. Cutoff is triggered with some amount left in the tank. This is because the turbopumps operate at ridiculous velocities and need something to pump, at a specific inlet pressure. The heat source (gas generator, expander, or preburner) that drives the pump is downstream of the inlet in the flow path, so cutoff has to happen by cutting off the drive force to the pump before the inlet loses pressure or runs dry.
If that pressure drops below minimum specifications or if the inlet goes dry, you will get cavitation and/or overspeed conditions, both of which would result in a violent reconfiguration of the hardware.
Solid lower stages are much simpler in this regard. At some point, the thrust will tail off until the booster no longer supports its own weight. At that point, it is jettisoned.