How to avoid Plagiarism
As the examples in Is It Plagiarism? showed, you don't avoid plagiarism simply by putting in a reference here and there. This is a bit like thinking you can avoid a charge of libel by writing 'Jones is a crook' and then putting in 'allegedly'. Certainly, you need to put references in your work, but that's not enough on its own. You also need to show that you are using the material, not just trying to get Professor X to write your essay for you. The best way to avoid plagiarism is to be aware of it when you are planning your essay and collecting material for it. When you come across something in a book or an article or on the Internet that you want to use, then either paraphrase it or quote it directly, but write down a note to say whether it's a quote or a paraphrase. Or you might use a different colour pen for a paraphrase, or you might put big brackets round it, or some other method. The point is that you should do a lot of collecting material. As a result, you'll end up with a lot of sheets of paper, all in your own handwriting, and it can be difficult to remember what was your own thoughts and what was a paraphrase of Professor X. If you make a difference at the time you're collecting material, then you won't fall into accidental plagiarism.
The other thing, the thing you must do, is reference. When you make a note, put the reference in then and there, so that you're not hunting round later desperately trying to find which book or article it was that a particular fact or idea came from.
The next question is, how exactly should you do references? This deserves a section on its own, see How to do References.