Airline stocks have been some of the best performers on Wall Street in the past two years. As shares of these companies have skyrocketed, an increasing number of individual investors have become interested in the industry.

UAL Chart

Airline stocks vs. the S&P 500, data by YCharts.

The airline industry can be a rewarding place to invest, as the U.S. market has had a tight supply and demand balance in recent years. However, airline stocks can also be incredibly risky, as these companies typically spend huge amounts of money up front to buy airplanes, putting them at risk if the economy goes south. Here are some key things to know about investing in the industry.

What is the airline industry?

Broadly speaking, the airline industry covers a variety of companies that provide air transport. This includes commercial airlines, which offer passenger flights between locations on set schedules; cargo airlines, which move freight across the world by air; and charter airlines, which offer air transport "on demand" for tour groups, sports teams, and other groups.

Not all airlines carry passengers Photo: The Motley Fool.

However, when people talk about investing in airlines, they almost always mean commercial airlines. These are the airlines that most Americans have contact with: They fly us all over the world for business meetings, vacations, and visits to friends and relatives.

How big is the airline industry?

The global airline industry encompasses about 2,000 companies, some of which are quite small. Within the U.S., a handful of airlines handle the vast majority of the nation's air travel.

The global airline industry will bring in nearly $750 billion of revenue this year, according to the most recent forecast from the International Air Transport Association. U.S.-based carriers generate annual revenue of more than $160 billion.

U.S. airlines generate more than $160 billion of annual revenue. Photo: The Motley Fool.

Last year, U.S. airlines carried a staggering 743 million passengers, according to industry trade group Airlines for America. Commercial airlines are responsible for about 8% of U.S. GDP due to their impact on trade and fostering of global business.

How does the airline industry work?

In the U.S., there are four main "kinds" of commercial airlines competing for investment dollars. They each have somewhat different business models.

"Network carriers" are by far the largest. A majority of the U.S. air travel market is controlled by the three network carriers: American Airlines (AAL -2.18%), Delta Air Lines (DAL -2.62%), and United Continental (UAL -2.52%). These airlines have global route networks based around a handful of hubs. These hubs typically manage several hundred flights each day, enabling connections between numerous cities.

"Hybrid" or "low-cost carriers," of which Southwest Airlines (LUV -0.54%) is by far the largest, tend to focus on the domestic market. They attract passengers through a combination of reasonable fares and good service.

"Ultra-low-cost carriers" are a small but growing group in the U.S. Companies such as Spirit Airlines (SAVE -2.90%) attempt to minimize costs by squeezing as many seats on each plane as possible and charging for a wide variety of services that are free on other carriers. On the flip side, they offer much lower prices than other airlines.

Ultra-low cost carriers are growing rapidly by offering rock-bottom fares. Photo: Spirit Airlines.

Finally, "regional airlines" such as SkyWest (SKYW -3.98%) operate planes with fewer than 80 seats on shorter routes. Regional airlines typically partner with one or more of the network carriers to operate flights to smaller cities. The network carrier partner sets the schedules, sells the tickets, buys fuel, and pays the regional airline a fixed fee to operate the flights.

The network carriers mainly target business travelers. They offer convenience to corporate fliers by operating frequent flights on popular routes and maintaining vast global networks so you can get from virtually anywhere in the U.S. to virtually anywhere in the world. Regional airlines operate smaller planes relatively cheaply, allowing network carriers to serve small markets that can't support mainline aircraft.

Hybrid or low-cost carriers target leisure travelers and business travelers on a budget. These airlines tend to be very service-focused, as their target customers (unlike many corporate travelers) are not tied to a single airline. Lastly, ultra-low-cost carriers compete primarily on price. They target customers who can't afford to fly (or can't afford to fly often) on network or hybrid carriers.

What are the drivers of the airline industry?

The three most important drivers of airline industry profits are the strength of the economy, fuel prices, and competition. Airlines tend to have fairly thin margins -- although U.S. companies are improving on this score -- which means these factors can have a big impact on earnings.

The strength of the economy helps determine the level of air travel demand. Network carriers are particularly susceptible to global recessions, as businesses (their main target market) often cut back on air travel to save money when they are not doing well. Airlines have high fixed costs, so they usually can't cut costs as fast as revenue falls during economic downturns.

Network carriers like Delta are the most susceptible to global recessions. Photo: The Motley Fool.

In recent years, fuel prices have been significantly higher than historical levels. As a result, jet fuel is the single largest expense for most airlines. About 26% of a typical $300 airline ticket goes toward fuel, more than taxes (21%) and labor costs (23%). Jet fuel price spikes can therefore damage profitability, especially in the short term.

When it comes to competition, at a high level, changes in overall industry capacity can have a big impact on airline profits. When there are fewer seats available industrywide, travelers will need to pay more to get one of those scarce spots.

Competition on a route-by-route basis is also key. Many travelers will pay a premium for nonstop flights. As a result, airlines make much more money on routes for which they hold a monopoly, or near-monopoly, on nonstop flights than on fiercely contested routes. Changes in competitors' capacity on various routes can have a significant impact on an airline's earnings, depending on whether those competitors are growing or shrinking.