A stock is a piece of the deed or title or charter or whatever that is the essence of the company as a piece of property.
You can buy that piece of the property for a value which fluctuates based on the value of the company as a whole, your fractional piece is tied to the value of what it's a piece of.
The stock market is the cumulative eco-system in which people are buying and selling stocks in different companies based on fluctuations in value of different companies at different times.
The name of the game is to basically always be selling just before a downturn and always be buying just before an upswing, so that the money you've bought the stocks with is always growing, because your bought stocks are always growing in value, until you decide to sell them.
There is a lot of other factors to it but that's basically it. It's a system in which you temporarily buy small pieces of companies for the purpose of selling them once they're more valuable than they were when you bought them.
If you're thinking that sounds a lot like crypto, you're not wrong, but the difference is that stocks actually have a modicum of regulation that are meant to keep people from getting fucked over quite as hard as crypto has done. Doesn't mean that premise is always lived up to, just look at 2008, but overall the stock market represents the safest form of investment you can make other than stuff like federal investments or buying a home that you intend to pass along to your kids.