It’s possible to have both, but what type of computer do you have? It must be a Macintosh using Intel chips. I’d also suggest keeping away from any Mac with less than 4 GB of RAM. Running 2 OSes can take a lot of RAM and you’ll be unhappy with less than that.
Once you’ve got that then you can run OS X and Window at the same time using either one of these programs:
Parallels:
https://www.parallels.com/
Fusion:
https://www.vmware.com/products/fusion/
The other (cheaper) option is to use Boot Camp to run Windows on your Mac:
https://support.apple.com/kb/ht1656
The downside there is that you have to shut down one OS to run the other. It’s an either-or thing. With Parallels or Fusion they can both run at the same time.
(You have to supply your own copy of Windows for all of these options.)