risk for a couple of days (the time between when they are purchased with the money withheld from your paycheck and the day that you can sell them) but you have a pretty large discount built in for safety. It is about as close to risk free return as any that exists.
One way to think about it - Do you want to buy your company's share at that day's price? If so, you don't sell. If not, you do sell because you really are buying it at that day's price based on income reporting law and w-2 requirements. A simple example (there are many variants and in most cases, the opportunity is better than this example):
You enroll in the ESPP and use $100 a week from your paycheck. Typically the "buy-in" period is 6 months, but it can vary.
At the end of the six month period, you have $5,200 to buy stock.
Stock price is $100. The ESPP has a 10% discount.
You buy 57 shares at $90 ($5,130 - the other $70 is carried over into the next period)
$570 is added to your w-2 as income (57 shares * $10 discount). So, your basis is $100 per share, or $5,700.
Three or four days later, you can sell.
If the price has increased to $101, you sell and receive $5,575 and your cap gain is $57 ($100 vs $101) and your pocket gain is a lot more than the $5,130 you put into it.
If the price dropped to $98, you sell and receive $5,586 and your cap loss is $114 ($100 vs $98) and your pocket gain is still a lot more than the $5,130 you put into it.
One thing - read and understand the details to make sure. I haven't seen a bad ESPP plan, but that doesn't mean they don't exist.