Apple's market cap valuation, which ended the day at $337.2 billion, edged into the lead despite the stock falling down 2.8 percent today. Exxon was valued at $330.8 billion after its shares closed down 4.4 percent for the day.
Market capitalization only pertains to how much, in total, the outstanding shares in a publicly held company are valued by the market. Apple's stock price is based on the composite of what investors think the company is worth now, combined with how much potential it has to grow earnings and expand into new markets in the future.
In the past year, Apple has earned $23.6 billion on revenues of more than $100 billion. Exxon has earned almost $38 billion but has collected revenues of nearly $393 billion.
As Apple has appreciated in value, it passed Dell, HP and finally Microsoft in May of 2010. It is currently worth over $130 billion more than Microsoft (which ten years ago was itself worth more than Exxon).