Well, first and foremost, the stock market is a zero-sum game. That means that for every winner, there is someone on the other end of the transaction who loses an equal amount. It's important to understand this because this means that you can be a winner even if someone else loses.
For example, if you buy a stock for $50 and sell it for $60, you make $10 on the transaction, but someone else lost $10 as well.