Addressing the OP only. yes, this is a problem today on the internet. as quietthinker said there are parental controls setting and various blockers OUT THERE. but today's advertisers and the software they used are very complex and sophisticated.
my wife and I was on a bible site downloading a program, (we have been to this site several times, with no problems),and in the midst of a download a pop up came announcing an x-rated site. we was schocked because this was a bible site. upon searching the orgins of the pop up, the site had unknown advertisers supporting the site. found out later this was normal pratice. well after that incident we installed more secure pop up blockers. but advertisers have many others way to get at you.
when our children where still at home we told them just don't click on anything that may pop up, or just shut off the computer. for as we know, that was the best defence, had no problems.
PICJAG.