The honest answer is "a lot," and a biography will cover it far better than a short post can. Gates and Paul Allen built Microsoft on the idea that software, not hardware, would be where the value in computing sat.
The pivotal decision was licensing an operating system to IBM and then to anyone else who wanted it, which put Microsoft software on an enormous share of the world's desktops. If you want the sourced version rather than a summary, Wikipedia is a reasonable starting point and its citations will take you further.