Plagiarism is a badly misunderstood term, and is all too often used as an umbrella term for all types of Unfair Practice. In fact even researchers in the field cannot agree on a definition. For your purposes it should be understood as submitting somebody else's work, and claiming it as your own, with the intention of gaining credit.
Notice that this term does NOT demand that you intended to do this! It is quite possible to commit plagiarism without meaning to, but the penalty is the same, and can be very heavy indeed. Here is the case of a famous and successful German politician, who had his career destroyed after being accused of committing plagiarism five years earlier! People have been caught and punished after even longer.
So, if the penalties are high, it can be done unwittingly, and you can be caught years after the offence, how can you, the student, avoid committing plagiarism accidentally?
The time you need to be most on your guard is when writing and submitting essays, and other written documents. You will be encouraged to read articles, books and papers, written by (usually) a respected researcher in the field, and then discuss what they have said. The purpose of this sort of exercise is to get you used to reading, and understanding what others have done. More importantly, you are then expected to demonstrate that you have understood, and that is what your document/essay/report does. In this sort of exercise it is obvious that you are going to have to use their words. This is quite acceptable, and indeed desired by your assessor, but it is vital that, where you use their exact words you state that you have done this, by enclosing their actual words in quote marks "", and then explaining exactly where they said it. Here is an example:
In an essay on plagiarism, Mr. Whyley claimed that "Plagiarism is a badly misunderstood term". This essay will examine the truth or otherwise of that claim.
Note that the exact words are quoted, and the number in square brackets afterwards refer to a Reference List, usually to be found at the end of your document. LaTeX makes citing and referencing like this child's play, and I believe that Microsoft Word also has tools available.
If you are discussing the meaning of what somebody has said/claimed, but not using their exact words there is no need to use quotes. After all, you are using your own words, not theirs, but you should still say where you found the claim:
In an essay on plagiarism, Mr. Whyley discussed the fact that researchers cannot agree on a precise definition for the term plagiarism. This essay will attempt to derive such a definition.
In the second example above the meaning of the referenced claim was used, rather than the actual words. This is good academic practice, but what happens if you use words similar to the actual words used, but perhaps in a different order? This is known as paraphrasing. An example follows below:
Original He was voted Germany's most popular politician, a chisel-jawed, gelled-haired aristocrat who held such rock-star status that his party used to play an AC/DC track every time he took to the stage. But Karl-Theodor zu Guttenberg has resigned as defence minister after being engulfed by a plagiarism scandal, leaving the ruling coalition with a serious charisma vacuum.
Student essay The BBC discusses the case of Karl-Theodor zu Guttenberg an aristocrat who has resigned as German defence minister after being accused of plagiarism. His resignation leaves the ruling coalition with a vacuum, because he held such a rock star status that his party would play a rock track every time he went on stage.
In the student's essay she has not used the actual words written on the BBC website, but has rearranged them, and interspersed them with her own. This is a very dangerous thing to do. Opinions vary, but I would regard this as a case of plagiarism, and would expect a penalty to be applied. As a rule-of-thumb, either use the exact words, in the actual order they appeared (and quote and reference them of course), or use your own words.
The Reference List should contain all the information needed for an interested reader to be able to read the source for himself. It should contain at least the title of the work, the book or journal in which it appeared, the author, date of publication etc. Different departments/schools/ colleges sometimes demand precise formats. Others are more relaxed as long as the essential information is present. Computer Science students should use a format similar to that used in the Departmental Handbook unless guided otherwise by their lecturer/supervisor. All students should speak to their academic tutor or module lecturer if they are at all unsure.
Usually a student will read many journals, books, websites etc. in reading about the topic before writing their essay. Some of them are used in the essay, and quoted and referenced appropriately. Others are read and understood but not directly used. This latter type of source should still be referenced, usually in a separate bibliography. Again, ask for advice before submitting your work.
All this is fine but you are Computer Scientists. What about source code I hear you ask, or I would hear you ask if I wasn't wearing a National Health hearing aid [Two Ronnie's, BBC, circa 1970's]. Far too many students, when faced with a problem, are inclined to go online to search for an answer, rather than asking their module supervisor for help. Suppose you search for, and find, a solution to a problem in an online forum? You download the method, alter the variable names to suit your code, and then compile, test and run your program? You are then not using the actual words of the method, after all, you have changed several things to make it work. Nevertheless you are using an algorithm which is somebody else's work, and you shouldn't claim credit for that. You should make it clear, by using comments, which parts of your program are your own, and which parts you obtained from somebody else. Academically speaking you are fine as long as you understand what the method does and how it does it. Unfair Practice-wise you are not claiming credit for work that is not your own. Of course, if you copy a whole program and reference it in this way you will not receive any marks for it, but you will not be prosecuted for Unfair Practice, and 0 marks for a coursework is better than 0 marks for an entire module! As always, tell your module lecturer what you have done and ask for advice.
Plagiarism is a fascinating academic subject in its own right, and one in which I am particularly interested. If you are interested in any aspect of this from an academic point of view I always have some project ideas available. Why not come and talk to me about methods of detecting/deterring it? I can always tailor a third year or masters project to suit your interests/ideas.