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.
A limit order is not guaranteed to execute because it stands only for the day and it's possible that the price you specify, for a particular stock, is not reached during the day.
When to use limit order?
The best way to use the limit order facility is when you've decided that you will buy a stock only if it's price touches or goes below the price you want. Conversely, it might be a good idea to use limit order while selling a stock if you expect a certain minimum price for the same.