Each time an order is placed, brokers are required to collect margins against the transaction, i.e., a certain amount to cover potential losses. Margin collection is mandated by the SEBI and if you are unable to maintain sufficient funds as margin, then a penalty will be levied on the shortfall amount.
In simple words, margin shortfall is the difference between requirement prescribed by SEBI and the funds or securities margin in your trading account. The margin you need for a trade depends on various factors including volatility, liquidity, expiry date (in case of F&O contracts), and other positions in your investments. Even after entering a trade, the margin required for open trade positions are subject to change.
Common situations that can lead to shortfall:
To know more about the penalty structure, refer to this NSE page.