How to Avoid Bad Links
You should avoid links that have over-optimized anchor texts. Look up the rules for anchor texts and follow these to avoid getting penalized by Google.
Ascertain that the sites you linked from have quality content in them. Google considers links with sparse content to be automatically generated content, scraped content or low-quality guest posts.
Such pages do not have much content that users can benefit from. Links from penalized sites should also be avoided as such sites are not listed on Google and would not have any positive effect on your SEO ranking.
Conclusion
Links are a good way to increase your ranking organically. However, care must be taken to acquire good links and avoid bad links.
Google has much consideration for links and does not hesitate to penalize sites with links that contravene its guidelines. Go for links from sites with quality content in them.
Thank you very much Israel.