For maximum privacy, use the Tor Browser Bundle in "high" security mode. Do
not attempt to set up Tor yourself. Do not use any Web browser other than Tor
Browser. Do not add any extensions or change any settings other than the
security level slider. All of these things can change your fingerprint, which
can easily give you less privacy than a non-Tor browser would have.
For any other browser:
1. Disable JavaScript entirely. LibreJS is not reliable; it would be very
easy for someone to either make a malicious script libre, or do just enough
to fool LibreJS into thinking that a proprietary script is libre. The only
reason no one does that is because of LibreJS's obscurity.
2. Enable cookies, but make the browser keep them only for the session (i.e.
delete all cookies when closing the browser). Disabling cookies entirely will
break a ton of sites and doesn't really help much.
3. Either set your user agent string to a common one (e.g. the one that the
Tor Browser Bundle uses), or use the Random Agent Spoofer extension. This
reduces your fingerprint to the point where servers will have a more
difficult time tracking you.
4. Install uBlock Origin. The default list blocks common trackers and
advertisers.
This will give you pretty decent privacy, but a determined entity will still
be able to track you.
Of course, in any case, do not identify yourself unless you must, because
that of course negates any privacy protection efforts.