Depends on the teacher and the students, as well as the actual size/importance of the mistake. If it is of any consequence I always try and say something, but if it is like a simple miscalculation or oversight in maths then I'll leave it. Normally I'll hint at it to the teacher, so they can pick it up themselves and then tell the class, to save the awkward "Ahh, your wrong :idiot2: ".. haha. The way I think about it is, if you leave it, it will sully someone's understanding of the material, as well as creating potential for losing marks in SACs and exams. So a kind of responsibility of knowledge...
But also, remember that you are not necessarily right. If you keep quiet and don't question the "fault" then you may not rectify a misconception of your own. Perhaps there are exceptions, etcetera, etcetera
So yeah, always best to voice your concern in some way or another. Though a blatant "WRONG!" in front of the class is not advisable.