To avoid such content, be vigilant about the websites you visit and the search terms you use. Also, set up appropriate filters and parental controls if needed. Don't get lured into anything that seems shady or against moral standards.
The best way is to stay away from such search terms and sources that might lead to such inappropriate content. Just don't go looking for it.