Party A buys 500 MSFT shares from partner B today, and then immediately sells them at the current market price to C. Depending on the terms of the deal, party A must pay back the same number of shares at a later date to party B. Let's say 30 days later, party A rebuys 500 shares of MSFT at THAT current market rate (hoping it has decreased over the last 30 days), and repays the same number of shares (hoping it's a smaller $ value) to party B.
The people lending the short are expecting the stock to go up, the people buying are expecting it to go down.
Hope that helps
You asked whose shares you are using to place the short. Mechanistically speaking, you, the short-seller, have to locate people willing to loan you the shares in return for some sort of consideration, usually a small interest payment. In practice, brokerages perform this service for you, often by using shares owned by other clients "on margin" (with credit from the brokerage). Your broker can probably give you, upon request, an "easy-to-borrow" list, showing the stocks that can be shorted without concern for how to cover your position.
In practice, short lenders usually don't participate knowingly in the short sale -- as mentioned above, they are often just other investors who own shares on margin (credit). So, they are generally hoping that the price of the share goes up (that's why they own the stock), but lending shares for a short sale has no connection with a particular market outlook.
They might agree that the stock is going to go down, but, because they're long, i.e. expecting the stock to go up over a long period of time (e.g. by the time they retire), they don't care, or at the very least isn't willing to make the gamble.
Also, there's a fee for the lending.
For two, it helps to understand who actually owns shares. Most individuals trade in a "margin" account in which the trader gets some additional liquidity in exchange for lessened rights. These people don't actually own the shares they buy -- they are in fact owned by their broker, who keeps a pool of all the shares their clients purchase. Because of this, the broker can loan out some of the shares in that pool for additional revenue. If I remember correctly, there's little risk involved if the clients sold more shares than were still in the pool because the broker can simply call the loaned shares and force the borrower to find another lender. Additionally, dividends are not diminished by lent shares because the borrower is forced to pay the forgone dividend to the lender. There is, however, trouble with voting -- you can't vote shares you don't own, and your broker can't vote shares on your behalf if he doesn't own them either. So in effect, your voting power is diminished by the percentage of shares lent.
If you don't want your broker lending out your shares you can use a cash account instead. This puts the shares in your name, but you lose your ability to sell shares before the purchase has settled 2 business days later. Additionally you can't short-sell or borrow money. None of these are a great hindrance to a long-term investor though, so it may be worth the trouble.