A limit order is an order to buy or sell a stock at a specific price or better. Therefore, a buy limit order can only be executed at the limit price or lower, and a sell limit order can only be executed at the limit price or higher. While limit orders do not guarantee execution, they help ensure that an investor does not pay more than a pre-determined price for a stock.
A limit order is valid until the order is executed, or for a maximum of 90 days, post which, if the order is not fulfilled, it gets cancelled automatically. Alternatively, a user can choose to cancel the order within the 90 days.