This is the type of thing that can get as complicated as all hell depending on how deep you go, but if you just want to get started then you can definitely keep things really simple (and generally you don't want to get fancy unless you REALLY know what you're doing). Disclaimer: I am by no means an expert, but I do have some experience, because I have a 401k that I can manage and also using personal funds out of curiosity.
@Jabberwok:
Buying stock is basically giving a company on the loan and tying your returns to their performance. You don't earn money at any point until you sell the stock, at which point the difference in value of each share from its price when you bought it is your profit/loss.
This is the basic gist. You buy something (stocks) for X dollars, and then eventually you sell it for Y dollars. Your goal is for Y to be higher than X. Which is just determined by the market value of your stocks at any given time. It's not fundamentally different from buying a collector's item and hoping it gains value over time. But I do want to clarify that you CAN earn money just by holding stocks. Many companies pay out dividends on their stocks (usually quarterly or semi-annually in my experience), meaning that they will actually pay you a percentage of what your stocks are worth periodically.
@Jabberwok:
You can sell your shares at any time during the day once you've bought some (when the stock market is open) and different markets, usually depending on geography, have different volatilities and stocks for sale. Most people hang on to their stock for a while in hopes that the value will contonue to rise.
There are certain complications for the average guy who wants to trade, namely that whatever company/service you are using for trading will probably impose some restrictions. Unless you're paying a lot of money, you probably won't be able to buy/sell stocks very quickly (day trading etc), at least not without incurring a large penalty. One reason for this is that it actually takes a significant amount of time (days or weeks) for the transfer of ownership of stocks to actually conclude (i.e. you get the official title and the money changes hands). So even if you buy some stocks and within seconds you see them in your account, if you try to resell them right away, you are technically selling something you don't officially own yet. I have an account with Fidelity and if I did that I'd get slapped with a huge fee for "good faith violation." I think in general with my account type I'm not supposed to sell anything off within 30 days of buying it. Also if you buy mutual funds I think many of them have similar restrictions by the fund managers, sometimes 90 days or longer.
@Jabberwok:
There's no advantage or disadvantage to buying a single share versus multiple shares, other than that the loss or gains will be multiplied. However, many investors like to buy stocks in multiple companies at the same time (diversifying your portfolio) to offset the losses that at least one of the stocks will probably have.
Robby touched on this slightly, but most likely you'll be getting charged a transaction fee for each purchase/sale of stocks. Not always, because I know people with special bank account types that give them a certain number of free transactions per year, or for me I can buy Fidelity-managed mutual funds without a fee because my account is with Fidelity to begin with, but in general you will be charged a per-transaction fee (it's like $8.00 for me). But it's per transaction, not per share. So if I buy a bunch of shares at once, I still only pay $8.00. But what this means is that if you are buying/selling small quantities, you are going to have a much harder time turning a profit.
My general advice? If you're just looking to mess around and get a feel for how it all works, pick a stock you think will do well and give it a shot with a small amount of money. Just recognize that especially in the short term, it's pretty much just a form of gambling. Obviously you should have a reason to buy a particular stock, and you should research the stock's history and details. There are lots of free resources out there for that. You can start by looking it up on Google Finance. I did this once when Sony stock was kind of low and I thought it had to come back up. I actually ended up having to wait over a year before the stock went up higher than when I bought it, but in the end I made nearly $2000 (and Sony does pay dividends, but my returns on dividends were negligible). $2000 for sitting on your ass for a year is pretty good in my book.
But if you're looking to actually make an investment, especially something you can leave alone without worrying about it or trying to manage it every other day, stay away from stocks and look into mutual funds. They are basically collections of stocks in various companies. Some are actively managed and charge some fees (or have a minimum investment required to buy in), but others are not. There are many types, such as industry sector funds (i.e. if you think retail is doing great, you can invest in a retail sector fund that is comprised entirely of stocks related to retailers). Some of these make ridiculous returns (like 30% annually), when they're doing well. But the absolute safest thing is probably to buy what are called index funds. These are funds comprised of stocks that represent a large cross-section of the market. The idea is that it's diverse enough that you are simply betting on "the market." If the stock market as a whole does well, your fund does well. If the market goes down, your fund also goes down. But statistically it's the safest bet. In the long term, the market has so far virtually always gone up. And even expert traders usually have a hard time beating index funds consistently.