By default Safari will block pop up windows; new windows (often containing adverts) that may appear when accessing some websites. There are also freely available extensions (downloadable tools that add extra features to Safari) that can block adverts displayed on web pages. Some add-ons also provide filtering and safer searching options.
Becoming familiar with these tools is important to controlling the amount of adverts and content seen in the browser, but talking to your children about the content they view online is equally important.
Encouraging children to be critical of content and not to view everything as trustworthy can help them distinguish between fact, opinion and advertising. Remind them that if they ever see anything online that worries them or makes them uncomfortable then they should always tell an adult.