Yes, students can be penalized for plagiarism, even if it was an accident. Unfortunately, instructors have no way of knowing the intent behind plagiarism. Depending on the type, instructors may allow leeway for students to learn from their mistakes.
However, repeated offenders are less likely to receive this flexibility. Additionally, instructors of college-level courses with clear plagiarism guidelines may enforce severe consequences.