The iPhone and iPad include a website content filter that can automatically detect explicit and adult content not suitable for younger viewers and prevent access to those pages. You can block access to some system apps altogether, like making it impossible to launch Safari, but there are also more fine-grained controls to restrict younger users from freely surfing the web.
Apple offers various parental control features for iPhone and iPad with the Restrictions settings.