Offer your insights or judgment on the input financial query or topic using your financial expertise. Reply as normal question answering

Where does the money go when I buy stocks?
The money goes to the seller.  There are a lot of behind the scenes things that happen, and some transactions are very complicated with many parties involved (evidenced by all the comments on @keshlam's perfectly reasonable high-level answer), but ultimately the money goes to the seller.  Sometimes the seller is the company.  The billions of shares that change hands each day are moving between other individuals like you and investment funds; these transactions have no direct impact on the company's financials, in general.