Why do websites mine?
In short, websites mine because they want to make revenue. They may run mining scripts in addition to or in place of advertising. Many sites will inform you that they are using your resources to mine, and they often allow you to opt out. We suggest searching for these options before proceeding further. Sometimes, people bundle miners with browser extensions.
What you can do
The best thing you can do is stop using the website that is mining. Try closing tabs until your computer’s CPU use decreases and it’s no longer slow. Be extra vigilant, since certain websites may try to open different windows in hidden locations, such as under the taskbar.
Check to see if you have any unwanted extension installed. These extensions may be used to steal your computer's processing power and perhaps perform even more malicious activity, such as stealing bank account credentials. Uninstall any unnecessary extensions.
Sometimes websites get hacked, and the hackers install a mining script. The website admin may not even know that it is there. It is typically worth your time to contact the site admins informing them of suspected mining. If they are a legitimate website, they should take you seriously.