For 'safe' investors, investing in stocks is nothing short of gambling. A company one invests in can go out of business. Even if they remain in business, they may make losses and not pay any dividends. In other words, there are no guarantees of any returns, plus there is a risk that the invested principal may get depleted. (The same logic applies for equity mutual funds.)
In some ways, investing is gambling if you have no idea of what you are doing. If you buy a company's stock without doing adequate research about its background, competition, business outlook, management capabilities then the possibility of making any money through capital gains or dividends will be like betting on a cricket or football match. You will either win, or lose.
Since you have no control over the outcome of a sporting contest, you will lose your entire wagered capital if your team loses. You won't have much control over the performance of a company either - specially if you hold only 200 or 500 shares.
However, you may use a stop-loss - set 3% (or 8%) below your invested amount in a company's share. If a share's price falls more than 3% (or 8%), you can sell the share at a small loss and recover more than 90% of your invested capital.
This loss mitigation technique is the major difference between gambling and investing. One would think that most investors would be disciplined about setting stop-losses for each of their purchases, and sell when the stop-losses get hit.
Experience says otherwise. Setting a stop-loss (or a trailing stop-loss) is an art that few investors learn and even fewer investors practice.
There is another important difference between gambling and investing: regular dividends. Only long-term investors benefit from it. If you do proper research before buying a stock and then hold on to it for 5 years or more, reinvesting the dividends that a company pays can add up to substantial returns.
In gambling, there are no dividend payments for betting over long periods. Since each bet usually has a short time limit, you either win or lose quickly. Then you place your next bet, with similar results.
You can read more here.