Most often these days, you simply have to buy a "ticket" online and then go to the airport to print out your boarding pass. But every airline and situation is different. If you find that you are required to bring a paper ticket from home, do not forget to bring it with you to the airport!
Book your flight online; you likely do not need more than your e-ticket. Read the rules and restrictions including the fine print.
Print your e-ticket before leaving for the airport. If you forget, don't worry--in most cases these days, you can key in your passport or credit card details upon arrival. Your boarding pass will then spit out of the machine and all you have to do is check your bag(s).
Buy a plane ticket directly from the airport agent if you didn't book online or over the phone. This situation is less likely, but could happen if it was an emergency or otherwise last-minute flight. Go to the ticket counter of your local airport and ask to buy a ticket to your destination. They will most likely not give you an actual ticket, but run the purchase and then issue your boarding pass.
Consider buying a ticket from a travel agent. Your local travel agency will gladly sell you a ticket to wherever you want to go! They are getting less business in the age of the Internet, and oftentimes they can make lives much easier. Not only will they sell you an airline ticket, but they will book your reservations and include information on hotels, book your accommodations and recommend local attractions at your destination.
Swap online. Sometimes it's possible to buy tickets or barter for tickets online if you can trust the source. Obviously you can't do this if a ticket is non-transferable.This is an iffy proposition, but it can be done. If you do decide to buy online from an unknown source, get as much information on that seller as you can prior to buying. Use a reputable selling service whenever possible.