what is the ms in teach you a lesson
“ms” here most likely means “means”. So “teach you a lesson” means to punish or strongly correct someone so they won’t repeat bad behavior.
In everyday use, it can sound threatening or serious, depending on the context. If you want, I can also explain how it differs from the literal word “lesson.”