Probably the easiest is to modify your hosts file. That's a file that lets you hard-code IP addresses. There are other ways to do it, but this is the simplest.
The file is in c:\Windows\System32\Drivers\etc\hosts if you're on windows, and it requires administrator privileges. On Linux and most Unix-based systems it is /etc/hosts.
The file format is the IP address to point to, followed by the domain name. There are two IP addresses that are most easily used, 0.0.0.0 means an unknown target, or you can point them back to your own machine to 127.0.0.0.
So one line to the hosts file may look like this:
0.0.0.0 coin-hive.com
There are many lists out there with bitcoin miner blockers. Add the lines to the end of the hosts file to automatically block them. When programs try to turn the name into an IP address they'll get the line from the hosts file first, blocking their CPU-intensive power-hungry scripts.
Less aggressive tools include adding them to a list in uBlock or Adblock Plus or other script-blocking tools. They're a good idea to use for various reasons, and better script-blocking tools allow you to whitelist sites so you can still support ads to sites you love.