This is the action of buying and selling goods and services, and in financial trading, this is the equities or commodities.
It can be both, depending on how you do it. Poker is a gambling tool, but some can consistently win hence becomes investing. Winning is not investing, but consistency is investment. Gambling is pure luck, maybe slightly skewed, but still luck dependent. Investing on the other hand have plans, result in consistency.
Put (money) into financial schemes, shares, property, or a commercial venture with the expectation of achieving a profit. In investing, there is a certain level of certainty with facts to based on. If you invest in a company, you see that the industry is growing and that company will likely grow, along with their financial situations.
To invest, instead of gambling, you need a system. A system allows you to know what to do, when to do it, and statistics on whether this method works or not. If not, you can improve upon to make it work. A system is the main difference between investing and gambling.