Microsoft (MSFT -0.74%) is one of the world's most diverse tech companies, with market-leading brands in multiple industries. Windows, Office, LinkedIn, Xbox, and Azure -- among others -- have grown Microsoft's dominance in the tech world and built safeguards within its business against macroeconomic declines.

Since the start of 2022, its stock is down roughly 24% as a broader market sell-off affected numerous companies. Rising inflation led to reduced consumer spending on tech, with worldwide PC shipments declining 15% in the third quarter of 2022, according to IDC. But Microsoft continued to see growth in revenue and operating income throughout the last year despite economic headwinds.

It's always best to invest in businesses rather than stocks. That can help you find companies likely to provide substantial gains over the long term, no matter the economy. As a result, it's smart to keep up to date with top companies like Microsoft. So, here are three things you should know about it.

1. It's a cloud computing star

According to Grand View Research, the $369 billion cloud computing market will see a compound annual growth rate (CAGR) of 15.7% until at least 2030. Microsoft's cloud computing platform Azure is responsible for the second-biggest market share at 21%, so it is in a good position to profit from the overall market's growth over the long term.

The company's cloud computing efforts are already paying off. In the first quarter of Microsoft's fiscal 2023, its Intelligent Cloud segment's revenue rose 20% year over year to $20.3 billion while operating income increased 17% to $8.9 billion. The segment significantly boosted revenue in a quarter when its More Personal Computing segment slightly decreased. Total company revenue still increased by 11% to $50.1 billion, thanks in part to Azure. 

Microsoft has plans to expand in cloud computing. On Nov. 16, CEO Satya Nadela said the company will invest in at least 11 new regions worldwide as it builds more data centers. Nadela specifically said that it is "very bullish" about Asia, calling it a "massive growth market."

2. The power of Windows

Its Windows operating system (OS) retained more than 70% market share since at least 2013, despite the presence of Alphabet's Chrome OS and Apple's Mac OS.

The company's dominance in operating systems has significantly boosted its other businesses, including its strong position as a leader in enterprise resource platforms (ERPs) with Dynamics 365. The subscription-based product line includes applications for all business aspects, such as marketing, sales, human resources, supply chain management, and more.

The wide use of Dynamics 365 has led to a 28.5% market share in the $50.5 billion ERP market, expected to have a CAGR of 10.7% until 2030.

Windows also became crucial to PC gaming and is overwhelmingly the OS of choice for gamers and developers. This boosted Microsoft's gaming efforts within its Xbox brand. The company launched its Netflix-for-games platform, Game Pass, in 2017 to run on Xbox consoles, expanding to PCs in June 2019. As a result, from 2020 to 2022, Game Pass subscribers grew from 10 million to 25 million.

3. It's moving into advertising 

Microsoft entered the digital advertising market in 2021 when it acquired Xandr. This year, the company took a major step in the industry by partnering with Netflix to exclusively run ads on the streaming company's recently launched ad-supported tier. 

The digital advertising market experienced a slight downturn this year as businesses tighten budgets, with ads one of the first things to go. But this poor economy will not last forever. According to the research site Omdia, digital advertising revenue will almost double from $190 billion in 2022 to $362 billion in 2027.

With Microsoft's past success in entering new markets, the company will likely become a major player in the industry over the next few years.

Microsoft's free cash flow stood at $63.33 billion as of Sept. 30. This leaves the company well prepared to overcome further economic declines (including a potential recession in 2023) and to continue investing in its growth, whether that be cloud computing, gaming, digital advertising, or another worthy endeavor. That makes the stock an excellent long-term investment.