You must hold the stock for a period of one year since the purchase date. The price you pay will be 15% off the lower of the prices for the first and last day of the 6 month trading period. The trading periods are Jan 1 to June 31 and July 1 to Dec 31 and the purchase date is the day after the trading period ends. You must sign up for the plan before the first day of the trading period and you can put up to 15% of your salary into the plan.
For an example of how this works, say you signed up for the plan and started contributing on Jan 1, 2012. The stock price on Jan 1, 2012 is $20. You contribute for six months and it is now June 31 2012 and the stock price is $25. Because the stock price was lower on Jan 1, you will pay $20 per share less 15% thus you will pay $17 per share when the current market value is $25 per share. This system insures that you will always pay at least 15% below current market price and possibly even less. You must hold the stock for one year from the purchase date (in this example the purchase date is July 1, 2012) thus you may sell your shares on July 1, 2013.
Hope this helps.