If you get a link from a low-quality website, you can try to disavow the link. Disavowing a link tells the search engines that you do not endorse the link and that you do not want it to count towards your ranking.