A stop-loss is a market order in waiting. Nothing happens while the price stays above the stop. The moment the security trades at or below the stop price, the order is triggered and sent to the market as an ordinary market order, which fills at whatever price is available at that instant. So the stop price is a trigger, not a promise. In a calm market with a liquid stock, the fill is usually close to the stop. In a fast-falling or thinly traded market, it may not be.
Slippage and gaps are the built-in risk. If a stock closes at $50 and opens the next morning at $42 on bad news, a stop-loss set at $48 does not sell at $48. It is triggered when trading opens below the stop and fills near $42, because there was no trading between $48 and $42 for the market order to catch. This gap risk is why a stop-loss cannot be relied on to cap a loss at a precise number, and it is the single most common way the tool surprises the investor who set it. A stop protects against a slow drift down far better than against a sudden crash.
The stop-limit order trades one risk for another. A stop-limit order pairs a stop price with a limit price: when the stop triggers, the order becomes a limit order rather than a market order, so it will not sell below the limit price you set. That removes the slippage risk, but it introduces the opposite one. If the price falls straight through the limit, the order simply does not fill, and you are left holding the position while it keeps dropping, which is the exact outcome a stop was meant to prevent. So the choice is between a sale that is certain but at an uncertain price (stop-loss) and a price that is certain but a sale that is not (stop-limit).
Placement is a judgment about volatility, not just about loss. A stop set just below the current price will be hit by ordinary day-to-day swings and can sell you out of a sound position at a temporary dip, after which the price recovers without you. A stop set far below gives the position room but allows a larger loss before it triggers. There is no correct distance; it depends on how much normal movement the security shows and how much loss the holder is willing to absorb. A stop-loss is a discipline tool, and setting it well is the whole skill in using one.