A stop-loss automatically closes your position once the price reaches a level where you accept the trade is wrong, capping the loss on that trade.
Using a stop-loss on every trade is one of the most basic risk-control habits. Note that a standard stop is not guaranteed — in a fast market or a gap it can fill worse than your level. A guaranteed stop (often for a fee) removes that risk.