Know Your Limits
If you want to buy a stock at a certain price, or sell a stock at a certain price, it's easy: Just set limits.
A market order is an order to buy or sell a stock at the current price. Limit orders are orders to buy or sell a stock at a specific price during a specific time period (or without a time limit, if you choose.) For example, say you want to buy shares of a particular stock, but only if the price falls to a certain level. Place a limit order to buy at that price, and if the stock hits that price, your order will be executed. If the stock does not hit that price, your order will not be executed.
Limit orders are a great way to protect downside risk. Say you buy at stock at $10 a share and want to reduce your potential for loss if the price falls dramatically. You could place a limit order (in this case, it's called a “stop” or a “stop loss” order) to sell the stock if the price falls below $7 per share. You could also place a sell order if the stock price increases to $14 a share in that case you may not enjoy further gains, but you would lock in your profits.