You get a share of the earnings, depreciation, etc. Thus, you get many of the same benefits of being a landlord without too many of the hassles. You also have a much more liquid investment than you do when directly investing in real estate. The downsides are that you have no control over when the company will sell its holdings or how it will manage them, like you would have if you owned an apartment building on your own.
Common stocks are ownership shares generally in manufacturing or service businesses.
REITs shares on the other hand are the same, just engaged in the holding of an asset for rental, rather than producing a manufactured product. Common stockholders are always last in line, and their earnings are highly variable because of this. This is why equity financing is the highest-cost form of financing for any corporation, whether the corporation be a REIT or mfg firm. An interesting thing about REITs is that they are probably the best inflation hedge around. Far better than gold stocks, which give almost no return over long periods of time.