How does MMR work

Both and neither. Briefly, the matchmaker only makes the game if it is predicted to be close to 50/50. It then raises the MMR of the winners, and lowers the MMR of the losers, and uses that new data to make a better prediction in future games. If a player is misplaced, they will win more than they lose (or vice versa), because the 50/50 prediction was wrong in their case and their MMR will rise over many games played, until they find their correct level (where they belong).

See How Competitive Skill Rating Works (Season 12) → Summary → “Summarize matchmaking, rating, and progression for me” for details. The references are mostly Blizzard statements, if you’d like official commentary on the topic.