Thrust termination is a concept specific to solid-fuel rockets. Unlike their liquid-fueled brethren, you cannot 'stop' a solid-fuel rocket easily. In the former, you can simply starve the motor of fuel and/or oxidizer; however, once you have ignited a solid-fueled rocket motor, it will continue to burn until all of its fuel has been consumed. The problem arises when you need to stop producing thrust before the motor has reached that point.
Probably the most famous modern examples of solid-fuel engines, the Space Shuttle's Solid Rocket Boosters, solve this problem quite simply. When the STS detects that the SRBs are about to burn out (by dropping chamber temperatures) it jettisons them using pyrotechnics so as to ensure that they do not burn down unevenly and imbalance it. They are then retrieved, refurbished and reused if possible. However, this solution only works if the solid rocket is mounted on the exterior of your vehicle. If the vehicle in question is a 'top stack' instead of a 'side stack' like the Shuttle - in other words, it has stages mounted atop each other in turn - then how can you get rid of the lowest stages as they approach the end of their burn?
The problem is compounded if the vehicle needs a particular amount of boost from each stage, perhaps because its position and trajectory varies before launch. The most common version of this type of vehicle is a ballistic missile. In such cases, solid-fuel rockets are desirable due to their low maintenance and high shelf life - but in order to hit its target, the missile must be able to stop burning its main stage motor(s) with some precision in order to avoid 'overthrowing' its warheads. The first system to run into this problem was the first major SLBM in service, the United States' Polaris Fleet Ballistic Missile. At the time of its development (1956-1959) major ICBMs were liquid-fuel - however this was not practical aboard ship.
So, the question arose - how can the motor stop when required?
The key thing to realize is that the motor does not necessarily need to stop burning. It simply needs to stop producing net thrust, or (ideally) begin to produce some retrograde thrust. Once you can do that, you can safely separate the stage from your vehicle and allow it to fall behind and away safely. This is called (you guessed it) thrust termination. At the time of the Polaris' development, the techniques used for thrust termination were a highly-classified secret, seeing as how they were critical to the operation of a solid-fuel ICBM. Over time, however, as the techniques spread throughout the civilian as well as military rocket trade, the basics of the system's operation became clear.
A solid rocket motor consists of a tube of propellant, with (usually, but not always) a nozzle of some sort at the rear end. When the propellant is ignited, it burns inside the tube and throws energetic debris (gases, usually) out the back, and the resultant equal and opposite reaction drives the vehicle forward. In the most simple solid rockets, like those found in fireworks, the propellant is packed solidly into the tube, and the burning surface 'climbs' the tube as the propellant burns away.
In a thrust termination rocket, however, the propellant is instead formed into a hollow cylinder inside the tube. This leaves a long, narrow void up the center of the propellant. When the rocket is ignited, fuel all along this hollow area burns, resulting in high pressure in this void. Since there is an exit at the rear (the nozzle) the gases exit that way, and again, the rocket moves forward. At the front of the motor, however, there is a dome-like cap placed over the top of this cylinder of fuel and the void at the center. It is usually hollow, and may be sealed off from the combustion chamber during flight. Around the lower rim of the dome, where it meets the cylinder of the engine, are small ports which can be opened so as to face outwards and forward. When the time comes to terminate thrust, these ports are opened (usually by some form of pyrotechnic device, also known as an explosive bolt) and any seal between the combustion area and the dome is broken. Immediately, hot exhaust gases flood out the front of the motor. If the design has been done properly, the thrust produced by this escaping exhaust is at least equal to, and perhaps slightly more than the forward thrust produced. At this point, until the propellant is consumed, the motor will produce either net zero thrust, or perhaps a slight backwards thrust. The vehicle can now safely detach the motor or stage without fear that it will 'run up its backside' (like happened to poor unfortunate Falcon 1 number three, SpaceX's third attempt at orbit on August 2, 2008).
The thrust termination ports are (usually) angled so that the exhaust gases do not scorch the upper stages of the vehicle as it moves away; however, both hot gas and hot, burning fragments of propellant are likely to continue flying out the ports for some time, so the upper stages will usually ignite as soon as the vehicle is clear. It is possible that the activation of thrust termination may also 'break up' the remaining propellant somewhat so as to disrupt the burn, causing the propellant to fly out both ends of the rocket and more quickly reduce thrust.
Note: I am unclear as to whether 'engine' or 'motor' is preferred for solid-fuel rockets; I have found multiple uses of both terms in references. I have chosen to go with 'motor' as that is what most NASA literature seems to use when discussing the SRBs.
Also note: I'm not saying this is *exactly* how actual ICBM/SLBM motors perform thrust termination - just that this is one possible method which, reading what's available in open sources, seems plausibly what's going on. Don't use this writeup to plan a war.