Let's take this simple example to learn how the stock market prices work:
You buy a car for $10,000.
On Monday, I see your sweet new ride and say, I'll offer you $10,100 for that car. You decline to sell, it's not worth spending another afternoon with sleazy car salesmen for $100. But wow! You made $100!
On Tuesday, I offer $11,000 for the car. You're hoping to get laid tonight in your brand new car, so you decline to sell. But, gosh! You've made $1000 in just 2 days!
On Wednesday, I offer you $9000 for the car. You get all depressed because you've lost $2000! So you sell the car.
Do you see anything wrong with this?
I do.
First of all, you did not make $100 on Monday when I offered to buy the car from you for $10100. You made nothing because - drum roll please - you did not sell the car.
Second, you did not make $1000 on Tuesday when I offered to buy the car for $11000, and for the same reason.
Third, you did not lose $2000 (11000 - 9000) on Wednesday when I offered to buy the car for $9000.
You lost it because you sold it for $9000, which was a darn fool thing to do.
Stock ownership is no different in this regard.
Where stock ownership is better than car ownership is that stocks sometimes pay dividends in cash.