It's been a tough decade for ExxonMobil (XOM 1.15%). The integrated oil major has dealt with volatile oil prices over the past 10 years, and the stock is up just 10% over that time.

But boy, the tide has turned in 2022 -- oil prices are through the roof, and ExxonMobil is poised to see its highest profits in recent memory. The demise of fossil fuels looks further away than some anticipated, and ExxonMobil is seeing the revival investors have been waiting years for. Here is what you need to know.

Lessons from the past

ExxonMobil is an integrated oil company, meaning it operates in various aspects of the industry, including upstream operations like drilling and exploration and downstream operations like refining. Exxon's exploration business exposes the company to oil prices; the difference between what it costs to extract the oil and the price a barrel sells for is Exxon's profit.

Oil prices were over $100 per barrel in the early 2000s and 2010s, and companies like ExxonMobil spent like drunken sailors on expensive exploration projects. Making money was easy back then, and ExxonMobil was sitting on billions in cash against little debt.

Aside from the financial crisis in 2008 and the resulting recession, you can see below that life was good for Exxon.

XOM Cash and Equivalents (Quarterly) Chart

XOM Cash and Equivalents (Quarterly) data by YCharts

The years that followed, from 2014 to now, have been the opposite. They've represented some of the harshest operating environments for oil companies. Not only did oil prices cash in 2014, but they crashed again during COVID-19, even going negative at one point.

Brent Crude Oil Spot Price Chart

Brent Crude Oil Spot Price data by YCharts

ExxonMobil is a proud Dividend Aristocrat, paying and raising its dividend to shareholders for 39 consecutive years. The company chose to maintain that dividend during tough times, borrowing as needed and wracking up more than $67 billion in debt by the end of 2020.

ExxonMobil insisted on leaning into the downcycle in oil prices for a few years in the late 2010s, spending more to raise production. However, the pandemic made management rethink their plan, and spending was reigned in.

Spending down, profits up

Exxon spent roughly $36 billion annually on its business at one point a decade ago. But the technology used for extracting oil has advanced since then, steadily lowering costs and increasing efficiency. Drilling and operating costs in the massive Permian Basin have fallen 35% since 2019, and Exxon's overall break-even price per barrel could drop from $41 in 2021 to $30 by 2027.

The lower costs have launched cash profits through the roof now that oil prices are high again. You can see below that Exxon's free cash flow has been a whopping $40 billion over the past year.

XOM Free Cash Flow Chart

XOM Free Cash Flow data by YCharts

CFO Kathryn Mikells joined ExxonMobil late in 2021. She has emphasized a disciplined spending approach and plans to restore the company's balance sheet by paying down debt.

XOM Cash and Equivalents (Quarterly) Chart

XOM Cash and Equivalents (Quarterly) data by YCharts

That's played out thus far; total debt has dropped to $47 billion in the 18 months since peaking, and the company's cash balance has grown to $11 billion. ExxonMobil is spending up to $30 billion on share repurchases over the coming quarters. However, expect the company to keep paying down debt so it's financially ready for whatever the future might bring.

A dividend stalwart once more

ExxonMobil stock is up more than 40% over the past year, but don't mistake it for a growth stock. Shares are making up for a brutal decade, and are still up just 10% over the past ten years.

The company's historic dividend is where ExxonMobil shines. Investors can look forward to a dividend yield of just under 4%, and this challenging decade has shown management's commitment to the payout.

Exxon's ability to restore its balance sheet will not only give the company long-term flexibility to seize opportunities and endure the next cycle, but it virtually ensures that it remains a dividend stock that investors can count on. For retirees and income-focused investors, that's as bright a future as you can ask for.