First and foremost, remain alert during your Web travels. Know where you are and where you are going. Second, avoid banner ads that resemble computer error messages or appear to ask for input. Third, take care when typing keywords in a search engine. Make sure they're spelled correctly.
Underhanded webmasters love to take advantage of commonly misspelled words.
Fourth, if you have concerns about little ones using the Internet, turn off the javascript. You'll find an option for doing so in your browser's preference settings. Webmasters accomplish most of their trickery with javascript. Turning it off prevents the code from working. Finally, if caught in the mischievous spider's Web, exit your browser and start again taking care to avoid the steps that trapped you.