Oil refiners operate a tough business in an industry prone to a high degree of volatility. Their underlying profits are highly dependent on price realizations. As spreads narrow, profits can fall significantly. However, the other side of the coin is that when operating conditions are good, growth is easily attained.

Last quarter, Marathon Petroleum Corp. (NYSE:MPC) put up impressive numbers. It produced strong growth in its core refining and marketing segment, as well as across other businesses such as its pipeline transportation unit. In fact, its performance was significantly better than that of fellow refiner Phillips 66 (NYSE:PSX).

Here is a rundown of Marathon Petroleum's second-quarter earnings, and the current state of its business conditions.

Growth in all the right places
In all, revenue grew 4% to $26.9 billion. Second-quarter earnings clocked in at $2.95 per diluted share. This represented astounding 61% EPS growth versus the same period last year. One of the biggest reasons for the outsized earnings growth was the very easy comparison period.

As previously mentioned, periods when spreads narrow significantly have a huge effect on refining. This was the case last year, and earnings fell off a cliff for most refiners. In the second quarter last year, Marathon Petroleum's $1.83 per share in diluted earnings represented a 27% year-over-year decline. This demonstrates how volatile refining profitability can be.

Nevertheless, business conditions improved substantially this time around. Operating profits in Marathon Petroleum's core refining and marketing segment jumped 39% during the quarter, to more than $1.2 billion. This was crucial for the entire company, since the refining and marketing segment makes up 92% of the company's total operating profits.

Separately, Marathon Petroleum generated 39% growth in operating profits in its pipeline transportation business. Marathon Petroleum management believes its integrated structure, which includes a midstream pipeline business, helps the overall company keep operational flexibility intact. With an integrated model, Marathon Petroleum can reap increased efficiency, which provides some cost control.

Marathon Petroleum's results compare very favorably to others in its industry. For example, Phillips 66 isn't seeing business conditions firm in its own markets. Adjusted profits fell 6% last quarter and are down 25% over the first half of the year.

One of the reasons for this divergence was higher costs for Phillips 66 in its midstream business. It saw increased maintenance activity for its pipelines last quarter, which resulted in higher costs and lower earnings.

Another key difference is in the revenue split within refining. Phillips 66 has reconfigured its refining business to lean more heavily on distillate. Weaker performance in distillate last quarter couldn't make up for higher volumes.

Along with its earnings release, Marathon Petroleum announced a hefty increase to its shareholder rewards initiatives. The company raised its dividend by 19%, and increased its share buyback authorization by a whopping $2 billion. Clearly, management is equally confident in its prospects going forward.

The market reacts as you'd expect
Over the past year, the market has sent shares of Marathon Petroleum climbing approximately 17%. Since its second-quarter earnings release on July 31, shares are up about 10%. It's clear investors were pleased with Marathon Petroleum's earnings, since a double-digit rise in just a couple of weeks is certainly good performance.

Meanwhile, Phillips 66 shares are up only slightly since it reported its own quarterly earnings on July 30.

Marathon Petroleum is benefiting from improving margins, and a controlled cost structure. Earnings jumped last quarter in its two most important business segments: operating and transportation. Going forward, assuming price realizations stay strong and margins don't substantially contract, there's little reason Marathon Petroleum can't produce another earnings beat.

It will benefit, just as it did in the second quarter this year, from an easy comparison period. Add it all up, and Marathon Petroleum's second-quarter earnings showed pockets of strength in several areas.