Yes. The only thing a domain name does is "points" to the server where your site is hosted. You can establish a functional web server locally by simply creating the same hosting environment (e.g. Apache server running PHP with a MySQL database, or similar).
There are several packages you can download in which the necessary software for a local server has already been included. In the case of PHP-based web hosting, packages such as Xampp or the sadly discontinued Mowes will let you very quickly set up a server which you can view from localhost.
You can also make use of your computer's hosts file to emulate browsing with a "real" domain name. E.g. if you were developing a site called acmetools.com, you'd edit your hosts file like so:
127.0.0.1 acmetools.com
Then you could browse to "acmetools.com" and it would run from your local server.