MacOS was a successor to DarwinOS, and is the proprietary Operating System used in Apple's desktop computers to this day. MacOS also served as the foundation for the iOS mobile Operating System, and in turn for iPadOS, WatchOS, and tvOS.
When MacOS is under discussion, it is important to remember that there are effectively two different versions of it. The original MacOS versions, 1-9, ran on the earliest Mac computers, and were not very successful. It was with the release of MacOS 10, or MacOS X, that Apple saw major success with the Operating System. This coincided with and was in part caused by the return of Steve Jobs to the company, as they were able to integrate features from NeXTSTEP in the new version of MacOS.
While MacOS is a compelling Operating System in itself, the real advantage to it came in 2007, with the release of the first iPhone. Here, Apple had a way to compete with the smartphone market, and in just a few years became the largest single phone manufacturer in the United States. Today, iOS is not the largest smartphone Operating System in the world, but holds 60% of the market in the United States, and 30% globally. It does however command the largest app ecosystem in the world, and because of its dominance in the United States, most mobile apps are developed with iOS primarily in mind, and then ported to Android devices.
Today, MacOS makes up somewhere between a quarter and a third of the American market share, and a slightly higher margin within the education market. MacOS retains this influence in the education market because it's a smaller, more tightly controlled Operating System, which leads to greater reliability than its main rival, Windows. However, it struggles in certain STEM fields, where specialized software developed exclusively for Windows is required.
Today, Apple has transitioned to focusing more on the gaming market as a new target for MacOS. It remains to be seen whether this will impact their overall market share in a meaningful way. In the meantime, it has led to the creation of a number of useful tools for those who already use Mac devices, such as the Game Porting Toolkit, which in turn has led to significant strides in software like Crossover and Wine, which are both used to improve compatibility between DOS-based and UNIX-based machines.
MacOS Puma Interface (10.1.0)
MacOS Sequoia (10.15.0)