Creating (or adding) the following information to a file named .htaccess can accomplish this. Make sure to have the file name start with a period (but not end with a period or file extension).
deny from unwantedsite1.com
deny from unwantedsite2.biz
allow from all
Replace "unwantedsite1.com" and "unwantedsite2.biz" with actual site names you see listed in your web statistics that you do not wish to show. Add additional "deny" lines for sites that you do not want to be able to refer to this web page. Place them below the last "deny" line but before the "allow from all" line. You can also block all traffic from an IP address if you replace the domain name with an IP address.
Once the file is created copy the .htaccess file to your httpdocs folder. Make sure to upload the file in ASCII (or text) mode.
For more information on Apache directives see:
If the unwanted websites are referencing specific web pages you could also rename those web pages to make it more difficult to find your content.