Employee Stock Purchase Plan Taxation
Here's a link that explains ESPP taxation...Employee Stock Purchase Plans.
The bottom line is that if you immediately sell your shares when they are deposited in your account, the vast majority of your gains will be reported through your W2. Your W2 will reflect the difference between the buy price and the market price as reported by your company at the time you get the shares. Any difference between the reported market price and what you actually sell it at, is reported as a short-term capital gain or loss.