I install wordpress on localhost.
WordPress stores site url and home url in database. And it can have only one value.
The easiest way to do it, would be to change these options to localhost address. If you do so, you will be able to work on this WordPress on localhost, but remote installation won't work (it will redirect you to localhost).
Another way to do this, is to fake DNSs response and set this domain to point on your localhost. You can do this by editing etc/hosts file, and then setting virtual host on your apache server.
I prefer second solution. WordPress will still work on remote server, and by editing etc/hosts file I can quickly change which WordPress will I see.