If you are using Safari 5.1 + go to the Safari menu bar click Safari > Preferences then select the Privacy tab.
From third parties and advertisers
For an older version of Safari selec the Security tab.
Select: Only from sites I visit
FYI ... when you post for help, please tell us which Mac OS X you have installed and in this case, which version of Safari. Thank you!