Yes. The WordPress hosting requirements are so basic that you can set up WordPress without a host or internet connection, for that matter. Setting up the CMS on your local machine is a thing, indeed.
It can serve several purposes, one of which is learning the basics without paying for hosting (even though free hosting for WordPress could do the same). Depending on the OS you are using, you might need these instructions for Mac or these guidelines if you are running Windows 10. Ubuntu users will find these commands helpful.