There are three reasons why your order is still pending:
1. If you have placed a Limit order
When you place a limit order, the order is placed and open until the stock hits the desired price which you have quoted. Therefore this might be one of the reasons the order could be pending.
2. When the scrip has hit the circuit limit
When the price of scrip hits the upper or lower circuit limit set by the exchange, orders will remain pending at that circuit price for that particular stock which means, there are no buyers when you place a sell order, or there are no sellers when you place a buy order, your order would be pending.
Note: Circuit limit can happen in both market and limit order types
3. When you place an AMO order
When you place an AMO or after-market order, the order is placed and open until the market opens and the stock hits the desired price which you have quoted. Therefore this is also one of the reasons the order can be pending.