A few things you can do:
Solution 1
If you have access to the domain name and/or administrative privileges to the websites' HTML, you can go to Google/Bing webmaster tools and block your site from being indexed from within their dashboard.
Solution 2
You can add a robots.txt file and disallow all. Here is an example:
User-agent: *
Disallow: /
...or disallow specific paths:
User-agent: *
Disallow: /foo/
Disallow: /bar/
Source
Solution 3
The simplest solution, add this to your <head>
:
<meta name="robots" content="noindex">
Source
Note that whichever solution you go with, you probably need to go to Google/Bing webmaster tools to delete any links that have already been indexed, because they will still be there.
Remove Google URL's
Remove Bing URL's