A stock market is a place similar to any market where goods are exchanged for a value the only difference is that on a stock market on stock/equity ie., shares and financial instruments are traded where the value of the stock/instruments are decided based on the demand and supply of the shares on the stock market.
Here’s a video on how a stock market works :