When reading submissions by students, for example coding assignments or bachelor theses, I stumble upon code or text not originally written by the students themselves, usually not referenced properly (see the edit below). After being confronted with this, I often hear or read statements like:
"I did write it myself -- using a source, and making some of my own modifications."
"Wikipedia explains this topic very well. I didn't know that I am not allowed to copy the article in my thesis. Wikipedia is even on my list of references!"
"Our code looks similar, because he helped me with some bugs I had."
Or that plagiarism in the methodology section is small and unimportant (original version).
I usually tend to see these statements as lame excuses, because I thought it would be common sense how not to plagiarize, but maybe they are right that they really do not know it better. It seems like they think the correct way to avoid plagiarism is to modify the source even more instead of doing it on their own in the first place.
Our usual approach to tackle this problem is to state that we do not want plagiarism, search for indications of plagiarism and then have endless discussion about it afterwards.
There are methods to circumvent this partially, for example by providing individualized tasks, and our university also provides workshops that teach you for example how a reference list should be built, but I am searching for ideas for the everyday teaching (programming labs, supervising students writing a thesis...) to promote the mindset that taking the text or code from someone else and modifying it is not the correct way, especially when it comes to graded submissions or publications.
EDIT: After receiving multiple comments about what I am worried about is not plagiarism, I would like to explain this aspect a little more by means of some examples:
There is no reference at all: This is clearly plagiarism, period.
The reference is not sufficient: This is the Wikipedia case from above. Having only "Wikipedia, https://en.wikipedia.org/" in the list of references without any indication which part of the text is from which article and which part is written by the student does not help at all and is in my opinion nearly as bad as having no reference at all.
There is a proper reference: As others have noted, this is not plagiarism. Still, in the context of grading, we have to look deeper:
Written exam: Everyone should agree that a student should fail an exam if he copies the solution by another student even if he writes "This solution was copied from the student sitting next to me."
Code Assignments: I had cases where students wrote "I copied this part from ..., because I was not able to do it myself and the rest of the program would not work without it". This is totally fine for me, but the student should not expect to receive points for the copied part, but only for the other parts written by himself. The same holds for code copied from other sources and modified afterwards.
Lengthy text passages: This is the example of copying significant parts of a Wikipedia article, again. But this is already covered in several other questions.