Last year, General Motors (GM 2.25%) earned $7.6 billion in profits, while selling more cars around the world than any other automaker.

That made 2011 a banner year for GM – but while the General led in sales, it was out-earned by several of its major rivals, including Ford (F 4.16%) and Volkswagen (VWAGY 1.95%).

That trend has continued in 2012. GM earned $1.48 billion in the third quarter – a decent number, but one that was dwarfed by GM's biggest global peers. Toyota (TM 1.90%) came in with a fat $3.2 billion profit – and VW's total was close behind at about $3 billion for the quarter.

That's a huge gap – one that looks even bigger when you realize that the global sales race between those three is actually quite close. GM has sold more vehicles in 2012 than VW, and almost as many as Toyota. Why isn't it making more money?

Why Ford is out-earning GM at home
The answer can be summed up in one word: margins. Ford's operating margin in North America was a whopping (for an automaker, at least) 12% last quarter, while GM's was a much lower 7.8%, down from a year ago.

Ford's margins in its home market are a big reason it out-earned GM last quarter despite selling significantly fewer vehicles. The Blue Oval's "One Ford" strategy has led to a simplified global lineup of (much) higher quality cars and trucks, which it can sell at higher prices with fewer discounts. Even better for Ford, the global nature of its product line gives it better economies of scale.

But the real icing on Ford's profitable cake is its "capacity utilization." Ford closed several of its North American factories during its restructuring last decade. The ones that remain are very busy: Ford's North American manufacturing chief recently said that the automaker's plants here are running at 114% of capacity. That means that some are building cars around the clock.

Slim profits overseas, despite big sales in China
The situation is worse in GM's other regions. While GM is losing a ton of money in Europe, as weak demand has led to underutilized factories and price wars in some regions, that's also true of VW and Ford, its biggest rivals in the region.

Things are different in China, though. GM has been the market leader for several years, thanks to the strength of its Buick and Chevy brands – and thanks to its Wulings, the inexpensive little commercial vans that make up about half of GM's volume in China. Wuling's sales success has been good for GM's bragging rights, but less good for its bottom line: Profits on the little vans are slim, even before they're split with GM's Chinese joint-venture partners.

Contrast with VW and the runaway success of its Audi brand, which is the luxury car brand of choice for China's powerful and well-heeled. VW has gained ground on GM in the Chinese sales race this year, but the profits race has been no contest for awhile: Audis have fat margins in China and elsewhere, enough to account for almost half of VW's global profits.

How GM will up its game
GM's margins are on course to improve over the next few years – that's part of what makes GM an intriguing investment opportunity right now. GM's product chief, Mary Barra, is driving a Ford-like global product consolidation that should save GM billions while improving the quality of its vehicles.

New products will help a lot. Ford's F-series pickups are a big driver of its profits in North America, while GM's pickups – which sell in similar numbers – are less profitable. That's because GM's pickups are older designs, and have needed discounts to keep sales strong.

GM has new pickups coming next year, which should help its margins in North America right away, as will a slew of other new products that are due over the next year or two. GM executives regularly point out that the company will go from having the oldest product portfolio in North America to having the freshest two years from now. Assuming that those new cars and trucks are as good as GM's most recent entries have been, that will improve GM's pricing power – and reduce its reliance on discounts.

Improvements overseas will take longer: Europe will lose money until at least mid-decade. Meanwhile, GM has a long-term plan to overhaul Cadillac and make it a legitimate competitor to Audi in China and elsewhere, but that will take several years to implement.

The upshot: Needed changes are already happening
The reviews on GM CEO Dan Akerson have been decidedly mixed, but broadly speaking he has put GM on a solid course. The company has already set in motion a number of significant changes that should raise its profits significantly in time. Assuming that GM continues to execute well on the product front – and given GM's painful history, that is not  a slam-dunk – patient shareholders are likely to be rewarded in a few years.