system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: What does buying a company's stock actually mean for the company?
gpt
It depends on when you buy it.

If you buy stock during an IPO (initial public offering) then you are giving money directly to the company in exchange for them giving you a piece of ownership in that company - represented by shares of stock.

If you buy stock from the stock market (or other private investor) then you are giving an individual owner money for their share of stock - the company isn't involved and gets no immediate benefit from the sale.

Now, those trades in the market help to determine how much the company is worth (called market cap, which is the current trading price of the stock times how much stock exists).  That can help the company in many ways (too numerous to list here).