The trackpad on the MB and MBP have a larger surface with more sensors than on previous laptops. As a result, when we type we have other fingers, thumbs etc. making contact with the trackpad and the trackpad receives input we don't intend. It happens to me quite often. So I hit Command + Z to undo and reposition the cursor. We need to train ourselves so that we keep our hands, palms, thumbs or other unnecessary body parts away from the trackpad while typing.
😉 cornelius