The margin level that governs both
When you trade on leverage, the broker requires you to keep a certain amount of equity relative to the margin your open positions use. This ratio is your margin level. As losing trades eat into your equity, that level falls, and two thresholds come into play.
The first is the margin call: a warning that your margin level has dropped to a set point, telling you to add funds or reduce positions. It is a chance to act before things get worse.
When the broker takes over
The second threshold is the stop out. If your margin level keeps falling to the stop-out level, the broker automatically starts closing your positions — usually the biggest loser first — to protect itself from you owing more than your account holds. You do not get a choice; it happens automatically.
The stop out is not the broker being unfair. It is a mechanical protection that stops losses from spiralling past your deposit. But it often crystallises losses at the worst possible moment, forcing you out right as the market is against you.
How to never get near either
The way to avoid margin calls and stop outs is not clever timing — it is using far less leverage than the maximum and sizing positions so that a normal losing streak cannot bring your margin level near the danger zone. If you routinely see margin warnings, your positions are simply too big.
A useful mindset is to treat the margin call as a failure of planning rather than a normal event. In a well-sized account with sensible stop-losses, you should rarely if ever see one. If you are seeing them, scale down before the next one becomes a stop out.