The money lost on trading, where does it go
If you are talking about intraday trading stocks or trading F&O, it is a zero-sum game. Your loss is a profit for someone else. Also, a portion of the loss is from costs - STT, Exchange Txn, Stamp, Brokerage, etc.
If you are investing in the markets and decide to exit a stock when in loss, that loss goes nowhere. Essentially the person buying the stock from you gets to buy it at whatever price you sold and if stock prices appreciate, that person can potentially gain from your loss.
But how is the distribution of the money done,i mean thousand’s of people are trading every day ,how does the broker distribute it correctly
Its all trade - Buy and Sell. That is the gist of it. In principle, the free market system takes care of the profit/loss.
Broker doesn’t distribute. Everyone uses a broker to trade on the exchanges. Clearing corporations (run by exchanges) ensure that profits and losses are settled correctly and also remove all counterparty risk.