How to work locally on a copy of my wordpress?

You may first need to modify the wp-config.php file for using the local database.

Then use the Search and Replace plugin to replace all your live site links with the localhost links. Example: If your live site url is: http://mysite.com/, replace it with http://localhost/mysite/. This will also replace the urls for pages and posts like: http://mysite.com/post with http://localhost/mysite/post.

Note: You’ll still need to manually update any links (and image urls) in the widgets, because S and R doesn’t replace them.