Buy low, sell high. And that's all there is to it. The trick of course is to predict accurately when it's at a low and that it will someday go high.
If you are a novice and do not understand market dynamics, and if you have only a few bucks each month to invest the best way to make money in the stock market is to invest regularly (e.g., monthly) in a mutual fund or similar derived investment instrument.
You'll not make big bucks and you'll not get rich quickly. But your investment over time will grow and after several years you'll have a nice nest egg when retirement rolls around.