For investors, Detroit auto giant General Motors (NYSE:GM) has been a mixed bag since its post-bankruptcy return to the public markets in late 2010. On the one hand, GM's profits and margins have been rising, and the company pays a nice dividend. On the other hand, it's a big old automaker, and analysts have been concerned about auto industry disruption from new high-tech entrants.

Lately, though, the bulls have been winning out. GM's shares have risen about 33% over the last six months, far outpacing the S&P 500 Index's (SNPINDEX:^GSPC) gain over the same period.

GM Chart

GM data by YCharts.

It's no secret that GM went bankrupt in 2009, the end result of decades of poor management decisions. But today's GM is a very different beast: Under a new management team led by ace CEO Mary Barra, GM has growing profits, minimal debt, and great prospects for the future. 

So let's assume that you want to buy shares of GM. How do you make that happen? First, you'll need to know how to open an online brokerage account and how to buy a stock; those links will take you to handy-dandy guides that will explain everything you need to know on both topics.

Then, once you've got the basics down, the next step will be to make sure you understand GM's business and outlook before you click the "buy" button. 

Barra is shown standing at a podium in front of a lighted GM logo.

Here in 2017, CEO Mary Barra has GM on a profitable, growing course. Image source: General Motors.

General Motors in 2017: A profit powerhouse

GM, of course, is one of the world's largest automakers. Most Americans know that it's the biggest-selling automaker here in the U.S., but you might not know that it's also the second-best-selling automaker in China and a major player in Latin America, Australia, and other parts of the world as well.

In comparison to its most successful peers, GM has very strong positions in pickups, SUVs (especially car-based "crossover" SUVs), and performance vehicles, all highly profitable market segments. It's somewhat weaker in small cars, commercial vehicles, and luxury, but even in those segments, GM has competitive entries (and in the latter two, long-term plans to increase its market share). 

A black Cadillac XT5, a midsize crossover SUV, on a city street.

GM has several new crossover SUVs that have been posting big sales gains. The Cadillac XT5 is a particularly profitable example; XT5 sales in both the U.S. and China have been very strong. GM has more Cadillac crossovers in development. Image source: General Motors.

For years, GM was held back by high fixed costs relative to its global competition, a legacy of rich labor deals and huge factory investments made in decades past, when GM had about 50% of the rich U.S. new-car market. Bankruptcy, a government bailout, and some smart post-bankruptcy management have helped to make GM's costs much more competitive with rivals like Toyota (NYSE:TM), Volkswagen AG (NASDAQOTH:VLKAY), and Ford Motor Company (NYSE:F).

The upshot is that GM today is quite profitable, with low debt and a strong cash reserve. Better yet, there's a good case to be made that it's primed to grow significantly from here -- despite all that high-tech disruption we're expecting. 

Looking ahead: The case for owning GM

Why has GM's stock been rising recently? In large part, it's because there's more and more evidence that GM isn't going to follow the usual "disruption" story line. Under Barra, GM is staking out leadership positions in electric vehicles, self-driving technology, and shared-mobility businesses -- everything that is said to be about to disrupt the old automakers. 

A white Chevrolet Bolt EV with Cruise logos and visible self-driving sensor hardware is parked outside GM's historic Design Dome in Warren, Michigan.

GM subsidiary Cruise Automation said last month that it has developed a "mass-producible" self-driving version of the electric Chevrolet Bolt. Image source: General Motors.

To be clear, that disruption story is for real. There's a good chance that some of the old automakers won't survive the transition. The takeaway here is that more than most of its rivals, GM looks set to not just survive but to thrive and profit in the new world of high-tech mobility.

There's also a more nuanced case for GM as an investment, one that Barra and other senior GM executives have been making for several months. It's explained in much more detail here, but here are the four key points in brief:

  • GM's earnings have been rising, and they are on course to increase profits substantially over the next few years.
  • GM is committed to a "disciplined capital allocation framework," in which it will seek returns on invested capital (ROIC) of over 20%, while maintaining strong credit and an ample cash reserve. It's also committed to returning all excess cash to shareholders via dividends and share buybacks. (Learn more here.) 
  • Recessions have historically squeezed automakers hard because of their high fixed costs, but GM is very well prepared for the next economic downturn, whenever it arrives. (Learn more here.) 
  • As discussed above, GM has laid the groundwork to "disrupt" itself before anyone else does. 

Long story short: Here in late 2017, the future of autos is wildly uncertain. But GM has big advantages over both its old-line auto rivals (because of its established tech savvy) and most of the new high-tech entrants (because it has the resources, knowledge, and scale to mass-produce high-quality vehicles at a profit). 

One more thing: Despite its recent price run-up, you haven't missed out. At a bit less than eight times its expected 2017 earnings, and with a dividend yield of about 3.5%, GM's stock is still cheap by historical standards. 

John Rosevear owns shares of Ford and General Motors. The Motley Fool owns shares of and recommends Ford. The Motley Fool has a disclosure policy.