If your company pays you in stock instead of cash, it still counts as income in the eyes of the IRS. You may not have to pay the tax immediately, but sooner or later, you'll have to write the IRS a check. If the company attaches conditions to the purchase, "restricting" your ownership, you don't have to pay tax until the restrictions expire.
When you receive shares of restricted stock -- either free or for a discounted price -- the restriction is that the company can take the shares back. They don't become vested (completely yours) until you meet the company's conditions, such as sticking with the firm for several years, or meeting the company's performance goals. When you finally become vested, you report the current value of the shares as taxable income. If you paid the company for the stock, deduct the payments from the stock value.
Under the 83(b) section of the tax code, you can report the value of your stock -- adjusted for the purchase price -- as income in the year you receive it. If you expect the stock price to be higher when you finally vest, this makes good sense: The initial value is lower, so your tax is lower too. If you're laid off or you don't vest for some other reason, you don't get to keep the stock, and you can't claim a refund on the tax.
The IRS requires withholding when your company pays you in stock, just like when it pays you in cash. If you wait to pay tax when you vest, you either give the IRS enough cash to cover withholding or let the company withhold some of the shares until you've paid taxes for the year. When you elect to pay taxes under 83(b), you don't own the shares, so you can't have them withheld.
If your employer gives you options -- the right to buy discounted stock at a later date -- rather than shares, the rules are different. When you get "statutory" options -- part of a regular compensation or incentive plan -- you don't pay income tax until you sell the stock. With non-statutory options, which aren't part of a purchase plan, you may have income either when you receive the option or when you buy the stock, depending on the stock's fair market value.
If you receive dividends on your restricted stock, you report them as part of your regular income until you're vested. After that, report them as dividend income. When you sell stock -- whether you got it as restricted stock or with an option -- you pay tax on the capital gains (the difference between the original value, less your purchase price, and the sale price). The length of time you own the shares determines if they're long-term capital gains, which have a lower tax rate.