You can buy stocks directly or by buying shares of a mutual fund that invests in stocks. The mutual fund option has some built-in benefits: instant diversification and professional managers who keep an eye on the market 24/7.
The most common way to buy stocks directly is through a broker. Brokers are paid to trade stocks and other securities on behalf of customers. (This is different than giving investment advice, though some brokers may also be investment advisers.)
There are basically two kinds of brokers: full-service and discount.
Full-service brokers dispense advice and can even manage your portfolio -- for a price. For example, a full-service broker may charge between 1.0% and 1.5% of the dollar amount of a stock purchase. So if you were to buy $5,000 worth of stock with a broker fee of 1.0%, you would have to pay $50 for that transaction. Some full-service brokers offer flat fees instead.
By contrast, discount brokers sometimes do little more than execute transactions for you, and they generally charge a small flat fee for that service. Some online discount brokers, for instance, offer trades for under $10.
No matter what kind of broker you choose, read the fine print about fees. For example, sometimes there are strings attached to cheap trades, such as requirements to make a certain number of trades per month or to maintain a minimum balance.