CodeCombat teaches coding through a game where players control characters using real programming languages such as Python or JavaScript. Students progress through levels by writing code to solve puzzles and defeat enemies.