Setup Local Web Server
This is a rather broad scope question but consider the following routes:
Setup Apache or Nginx to serve your working directory eg /home/username/repositories/yourproject/ as a http webroot.
Setup your computers local hosts file to serve an internal style domain eg dev.yourwebsite.com or internal.yourwebsite.com (doesnt really matter what you use, but should aim for it to be something your not going to need access to on the public internet.
Add that to /etc/hosts
Then, import your database into your local mysql and update app/etc/local.xml with the username and password for the new database.
Update core_config_data to point your website to internal.yourdomain.com
This assumes of course your working on a Linux or Mac based computer, you can get it working on windows but if your using windows I would reccomend you approach it as a virtual machine.
Setup Virtual Machine
This is the approach that I usually use. Download virtual box (https://www.virtualbox.org/)
Then install a Linux distribution such as Ubuntu then install Apache/MySQL/PHP as you normally would on your production server. You will need to update your hosts file again but instead of pointing to 127.0.0.1 as above, you'll point it to the IP given to the Virtual server.
Alternative routes include Docker: https://github.com/kojiromike/docker-magento which I have not currently used there are several preconfigured environments for working with Magento but the steps will be vastly the same - point hosts to the docker instance and sync file systems.