The most common method to buy stocks is to use a brokerage. Brokerages come in two different flavors. Full-service brokerages offer you (supposedly) expert advice and can manage your account but also charge a lot. Discount brokerages offer little in the way of personal attention but are much cheaper.
At one time, only the wealthy could afford a broker since only the expensive, full-service brokers were available. With the Internet came the explosion of online discount brokers. Because of them nearly anybody can now afford to invest in the market. We've actually got a whole separate tutorial on brokers and online trading, and you can check it out.