Investing in stocks is when you've calculated the fair market value of a company, and you're smart enough to not pay more than a fair price for that stock. If you're lucky, you might be able to pick up that company at a substantial discount to its fair market value. For example, Dow Chemical has a fair market value of $26 that I was able to pick up for $19 last December, a 27% discount to fair. It's currently trading at $28 this December along with most other stocks that are trading at a 20% premium to fair, a $9 per share, 47% capital gain for me just for hanging onto it for a year. However, Dow Chemical was trading for a mere $6 per share in March of this year, and whoever was smart enough to pick up shares of Dow Chemical at $6 would have made a 450%+ profit if they sold it today. No mutual fund in the world can even come close to making that kind of annual profit.
Gambling is when you have no idea what the fair market value of a company is. And that's when I can bluff and tell you that Dow Chemical is really worth $42, and hope that you're dumb enough to buy it from me at that outrageously inflated price.
And trading is a lot like playing Seven Card Draw. If you don't like what's in your hand, send two stocks back to the dealer and pick up two more from the stack to hope for a winning hand.