As the name implies, a stop-loss order is used to minimize your losses when a stock falls in price. In this particular type of trade, also known as "sell stop" order, you place a trade to sell once the stock price falls below a set price (the stop price). Once the stock reaches the stop price, the order then becomes a market order and is sold just like if you place a sell order manually at that very moment.
For example, say you owned 100 shares of Home Depot (HD), which you just purchased at $38.00/share. You want to sell if the stock falls to $35.00 to minimize your losses to $3.00/share. Using a sell stop order, your trade would be executed once the price falls to $35.00, thus limiting losses to approximately $3.00/share.
Keep in mind that since the sell stop order becomes a market order once the stop price is hit, the order could be filled at a price other than $35.00 depending on how quickly your stock is falling. Thus, the stop price is only a "trigger" price and may not be the actual price at which the trade is filled. With a liquid stock, this difference is likely to be only a few cents. In addition, commission charges are only charged if/when an order is filled. For more information about stop-loss orders, we recommend reviewing this article.