A Stop-Limit Order basically automates the preferences of an investor or trader, to reduce exposure to price uncertainty even after a trade ticket is entered, by stipulating a price at which the search for a bid/ask price is to begin, but limiting the range of prices at which an order can actually be entered or executed.
A Stop-Limit Order has two parts: the Stop Price and the Limit Price. The stop price is like an amendment or contract rider on a security that is held which stipulates that if the price of the security crosses the Stop price, the search for an agreeable price begins.
The Limit comes into play after that point, and is the limiting parameter which decides whether a price is agreeable or not; if a price is above the limit in the case of a buy-stop, the order will not execute, and vice-versa (below the limit) for a sell-stop.
Consider an investor who would like to automatically lock in gains without having to do much legwork: he can name a price which he believes to be high, and say that if the price crosses that line (the Stop Price) the limit order will be entered.
The limit order is an order to sell but only if the price someone is willing to pay at that point is still above a price, which could be the stop price or even a price slightly lower or higher.
Otherwise, if it were just a Sell-Stop, with no Limit stipulated, the price could bounce up over the stop price and trigger a sell order at the next available price, but the next available price when the trade is actually transacted (filled) could be significantly lower than the price which triggered the order.
Likewise if an investor seeks to hedge against losses, the stop price could be on the low end to sell if things go south, but a limit would prevent the sell order from going through if the price rebounds.