Most people do set out to deliberately plagiarize. In many cases it occurs because students simply don't know how to properly cite the sources for their papers or projects. The best way to avoid and prevent plagiarism is to understand how to use the style guides like MLA, APA, or Chicago. Each profession has its own citation style, and you can find guides for each in the library's collection. You can also find tutorials and assistance through the Bridgewater Writing Center.
Here's an excellent video tutorial from the University of Bergen, Norway. It's in Norwegan, so don't forget about the English subtitles.