You are taxed when you exercise nonqualified stock options (NQSOs) and thus acquire the underlying shares of your company's stock. The difference between the market price of the stock at exercise and your exercise price is called the "spread." For tax purposes, this is compensation income that is reported on your IRS Form W-2.
Example: You have stock options with a $10 exercise price. You exercise them after vesting when the price of your company stock is $12. You have a $2 spread ($12 – $10) and thus $2 in ordinary income. You will also have tax withholding when you exercise the NQSOs.
The proceeds when you sell the shares, whether immediately in a same-day sale or after a holding period, are taxed under the rules for capital gains and losses. You report the stock sale on Form 8949 and Schedule D of your IRS Form 1040 tax return.