Credit: Flickr user Steve Snodgrass.

Some people spend too much time -- their whole lives, even -- avoiding the stock market because they simply don't know how to buy stocks and the entire market is one big mystery to them. It's sad but true that as we grow up, few of us are ever taught about investing. That's a crying shame, as the stock market is, for many of us, the most promising route to wealth and a comfortable retirement.

How to buy stocks: the big picture
In a nutshell, all you need to do to is open an account with a reputable brokerage -- by filling out an application and by seeding the fund with some money. Then you're ready to go. There are a few alternative ways to buy stocks, too, such as investing in a mutual fund directly with the fund company (instead of through your brokerage) and investing directly in some companies -- for example, through a "DRIP" plan that lets you bypass brokerages.

Investing through brokerages is a typical approach, though, so let's look into how to buy stocks in a brokerage account.

How to buy stocks: kinds of orders
The Internet has made do-it-yourself investing much simpler, because the websites of many good brokerages offer research reports on companies, tools like stock screeners, and also the ability to look at your account's status and place trades all through the day.

Knowing how to buy stocks means understanding at least a few basic kinds of orders. Let's start with "market" versus "limit" orders. A market order tells the brokerage to buy or sell the specified stock at the current, best-available price, whatever that is. A limit order gives you more control, as you specify that the stock must be bought for no more than a certain price, or sold for no less than a certain price. Of course, if the stock keeps rising or falling and doesn't enter your desired territory, your trade isn't executed. For most big, often-traded stocks, market orders are fine. For less-frequently traded ones, or ones that can be volatile, limit orders can be valuable. Limit orders are also good if you definitely want to buy or sell a stock, but not at the current price. Brokerages often charge a little more per trade for limit orders.

Understanding how to buy stocks also requires some attention to timing. Be aware when you place your order that it can be "good 'til canceled" (GTC) or might be set to expire at the end of the trading day. You can specify which you want. Note, though, that GTC orders aren't in effect forever. The brokerage likely has a policy that cancels them after a certain period, such as 90 days.

How to sell stocks
If you want to learn how to buy stocks, you should know how to sell them, too. For the most part it's the same -- you can place market or limit orders, good for the day or until canceled. But there are other kinds of orders to know about, too. The "stop" or "stop-loss" order, for example, is handy for selling. It lets you put a rule into effect, to sell a specified number of shares of a stock that you own, if it hits a certain level. So if you own shares of a stock that's trading around $50 per share, you might place a stop order to sell them at $40. That way, if you're not paying attention (perhaps if you're on vacation or are just not super vigilant with your investments) and the stock starts falling, you'll get out of it before you lose too much. Just be careful, because if you set the stop too close to the current price, normal volatility might get you ejected from a healthy company that you wanted to own long term.

Knowing how to buy stocks (and how to sell them) is a vital part of investing, but there's much more to know. For best investing results, keep reading and learning.