It depends on the site. When I make a site and the database is hosted on localhost / the same server as the web-server, no.
But I have noticed that if you use for example WordPress, you are testing on your local copy one minute and are on the live site the next as the url seems to be hard-coded in the generated pages (in the case of WordPress a setting in the database).
So:
- Always make sure the database connection is to your local database (ideally that is just in one place and you don't have to change anything if the live site uses localhost as well)
- Look out for links / settings / rewrites that direct you to the live site from your local site.