Thanks for your great question!
You are absolutely correct when you state that there has to be a buyer when there are sellers. The number of shares sold of a particular stock on a given day has to equal the number of shares purchased of that stock on that day. On the stock market, this is referred to as the "volume".
The relationship between the number of goods sold and the number of goods bought holds in any market, not just the stock market. The number of ski jackets sold by a retailer must equal the number of ski jackets purchased by customers. However the price of ski jackets doesn't necessarily stay the same. The retailer may decide to have a sale (which can be considered a sell off) on the jackets if it's July and the demand for ski jackets is low.
The stock market works in a particular way. To use an example from a recent event, suppose a major pharmaceutical company (we'll call them Company A) just had its supposed new wonder drug banned by the FDA. Shares in that company at the current price are now less attractive to both current Company A shareholders and those considering purchasing shares in Company A. This will cause those interesting buying the stock to demand a lower price to accept Company A shares (known in stock market lingo as the "bid price") and those interesting in selling Company A shares to offer a lower price in order to get rid of the shares (known as the "ask price"). Eventually a buyer and seller will agree on a price (meaning that the "bid" and "ask" are identical) and shares will be sold. This price will naturally be lower than the price the shares were selling for before the bad news came out.
I hope this adequately answers your question. If you have any questions about economics or the stock market, please send them to me via the feedback form.