The first option is Apple's own Boot Camp, which comes with OS X. This allows you to split the drive into two partitions; on one, the copy of OS X. On the other, a copy of Windows can be installed (which has to be purchased separately of course). When you switch on the Mac, you choose whether to be in the OS X world or the Windows world. After you have finished with, say, Windows, you shutdown, restart the computer and this time start it up in OS X. It works, but it's clunky in several respects. For a start, it is not exactly convenient if you need to constantly switch between the two environments as a reboot is needed each time. Secondly, you need to give up a certain amount of hard disc space. Finally, you are restricted to the versions of Windows that Boot Camp supports. In practice this means 64-bit versions of the latest releases of Windows 10. Need to run 32-bit Windows 7 Professional or even Windows XP? Tough.
The second option is virtualisation. Here, you install a special program that 'pretends' to be another computer, upon which you can then (and with very few restrictions) install any operating system you want. You can create as many virtual machines as you wish and, depending on the power of your Mac, run several simultaneously, each in their own window. For instance, in the screenshot at the top of this page a Mac is running a second copy of OS X El Capitan plus a copy of Windows 7 at the same time. The benefits are huge: you can work in OS X and Windows simultaneously, switching between them as required and sharing information; it uses less disc space (as it can virtualise that too!); you can use any operating system you wish.
Virtualisation is so popular in fact that there are at least three packages available, one of which is even free. The free one goes by the name of VirtualBox and has been around several years. It's a bit techie to get going, but does work and does the basics well. For occasional users it is quite sufficient and well, the price is unbeatable.
The other two offerings are both commercial. One is VMWare Fusion and the other is Parallels Desktop. Both are pretty good but Parallels have pitched their product at regular consumers and have done an excellent job. It takes all the guesswork out of setting up virtual machines, in a manner that many IT professionals who are familiar with virtualisation will find astonishing. It also seamlessly integrates the Mac and Windows environments so that data is available to both without effort e.g. key Mac folders are mapped automatically as drives in Windows. Windows applications can be integrated - want to be able to run, say, Windows Paint from an icon on the Mac's Dock - no problem. Highly recommended.