Are you wanting to play the stock market for fun? To get rich quick? Or to build wealth in the long term? You need to decide on your motives.
Since you're still young, this is the best time to get a solid long-term strategy in place, but you need to look at your finances holistically. First, if you have any debt other than a mortgage, get it paid off. If you don't have enough savings to cover 6-12 months of living expenses in case your income dries up, get that in place. After that, whatever is left over after covering your living expenses month to month, just put it in the S&P.