Spam or bad backlinks are removed using Google disavow tool. The tool is used to disavow links that are harmful for your website. These links are excluded from ranking your website in search engines.