The Electronic Frontier Foundation (EFF) has created this Surveillance Self-Defense site to educate the American public about the law and technology of government surveillance in the United States, providing the information and tools necessary to evaluate the threat of surveillance and take appropriate steps to defend against it.
Surveillance Self-Defense (SSD) exists to answer two main questions: What can the government legally do to spy on your computer data and communications? And what can you legally do to protect yourself against such spying?
Go to the SSD website (https://ssd.eff.org/home) and read it all for yourself!
I would add a few comments on my own.
First, if you have any reasons to fear a government then you should never use any computers at all, at least none which belong to you. Basically, you need to pretend that ANYTHING that goes on the Internet will become public knowledge. Only use computers which are not traceable to you in any way (usage, contents of transmission, physical location and monitoring, etc.).
Second, you need to assume that ANY computer you have at home, or in your car, or in your office, will be not only electronically penetrated, but physically seized.
Third, do not use encryption for anything not 100% legal and politically correct. You HAVE to assume that Uncle Shmuel can - and will - decrypt all your encrypted communications or stored data. The truth is that Uncle Shmuel can probably not do this, but you have to assume he can. Encrypted data is like a 'red flag', like I beacon of sorts yelling "I am hiding something! I am hiding something!" - at least that is what the bad guys think. So *never* use it for anything illegal or politically incorrect (that can get you blacklisted also), but DO use as much encryption as you can if you do only 100% Uncle Shmuel approved stuff as this overloads their snooping infrastructure.
So, you might ask, is it possible to use the Internet and defeat the government spooks? Yes, of course, but chances are you do not know how - so don't try. You need to understand how networks work, what triggers suspicion, what kind of encryption is really solid, etc. Most of you probably don't, and knowing just a little is even more dangerous than simply operating by the three basic assumptions above.
The main thing: do not attract attention, do not be noticed. Bury yourself deep in the 'background noise' of the Internet.
You cannot built a fortress against the big guys, not a legal one, not a technological one. Once they see you - you are dead. So remain unseen.
But do check out the SSD website. It's a good basic reading.