Public education generally teaches this. My sons have done time in both 'good' schools, and 'bad' schools, and the teachings regarding this were not neglected in any of the settings.
What did vary, however, was the other kids. A teacher can preach kindness and tolerance until they're blue in the face, but if the student isn't experiencing it at home, its not likely they're going to reflect that at school. And if a well meaning kid is surrounded by other kids spouting an alternative message, they're going to pick it up. In most cases, peers make more of an impression than an instructor.