It usually occurs when you borrowed money from the broker to invest and your investments lose value. The broker may then require you to deposit more cash, add more securities, or sell some of your positions.
If you cannot meet the margin call, the broker may sell your investments without your permission to reduce the loan. In simple terms: a margin call is your broker telling you that your account does not have enough equity to support the money you borrowed.