Ahrefs is in search for the best solution that will accurately identify bad links, but so far, we haven't found a way that can be as precise as a manual review. Therefore, the whole process of detecting spammy links comes down to the following steps:
1. Put a domain into Ahrefs Site Explorer tool and head to the Referring domains report from the left menu. You’ll get to see all the domains that link to a given website.
2. You can now sort out these domains by various metrics. As you’re looking for low-quality websites, click the DR (Domain Rating) metric to sort them from the lowest DR to the highest.
(Read more about Ahrefs' DR here: https://ahrefs.com/blog/seo-metrics/)
3. Low UR/DR metric doesn't necessarily mean spam, as it may mean that the site from which that link originated is new. So, you’ll have to investigate each suspicious link further. Look for common spam indicators such as spammy sounding domains, lots of foreign (especially Chinese — .cn) domains, sites that obviously don't belong to your niche, etc.
4. When you detect a suspicious domain, click the number under the “backlinks” column for more details. The first thing you should do is to look at the anchor text of the link. If it looks suspicious, incoherent or doesn't coincide with your niche, it can be a strong signal of a spam link.
5. You can also click on a suspicious link to check if the content on that page is low quality.
The other way to detect spam with the help of Ahrefs Site Explorer would be to check the Anchors report. Typically, if there are a lot of same irrelevant anchors, the links are spammy. From there, you can see the referring domains and backlinks by clicking to expand for details:
Please note that it is strongly recommended to disavow spammy backlinks from Google Search Console. In order to do this, create a .txt file with all the unwanted referring domains in it (or simply export it from Ahrefs Dashboard). When the file is ready, submit it to the Disavow Tool within Google Search Console.
More details here: https://ahrefs.com/blog/bad-links/