Click in the menu Safari on Preferences. A window will appear:
Note: These are basic settings. Using a filter proxy will offer more options for blocking content.
Test: Test these settings for anonymity using this guide.