The stock market is very similar to gambling in the sense that one has access to data and facts and can make assumptions on which direction something is headed.
The ability to make this kind of indication regarding a stock is very useful because you can buy something called an option. An option is essentially the right to buy someone else’s stock at a certain price. So this basically means if you think oil companies are going to increase in value, you could buy an option to buy oil company A at a certain price x dollars by this certain date.
You go to a brokerage and ask them to sell you the right to buy someone else’s stock at that price. This is called a call option and you are essentially betting that the stock will go up way way past x dollars to y dollars, you will purchase the stocks from the other person for x dollars and sell them back in the market for y yielding a net gain of y-x dollars.
A put option is the exact same idea except this time you are betting that the stock will lose value. So imagine there is an excess of wheat in the market and you believe bread making companies will lose value. So you approach a brokerage and ask them to buy stock A at price x from you by a certain date. If that date comes and stock A is worth y which is much lower than x, you simply exercise the option buy the stocks at a much cheaper price and then resell them at the x value.
Options are very simple transactional tools and can be used to operate with stocks very quickly. However, getting cleared to trade with options takes time and should not be experimented with by novice traders.