As Magento2 is one of the most used ecommerce solutions, on this planet, there are a lot of ways to run it. A modern, full blown, production ready, Magento stack will probably consists out of:
varnish, redis, nginx, php7-fpm, php7-cli, mysql and magento2 community edition (ce) or magento2 enterprise edition (ee). For development purposes you can remove some of the components as you probably don’t want a lot of caching; except when you want to test that kind of stuff. A normal enterprise environment would do that kind of tests in their acceptance anyway.
If you are developing on Mac OS; you will roughly have three options:
1) Run Magento inside a linux VM (or use vagrant)
2) Dockerize it and use docker on the mac
3) Install it locally