On the internet you can find many sites to teach you programming, like for example Coursera. CodeCombat has a different approach and helps you to learn programming by playing a nice 2D game.
The game is similar to small RPGs that are online or on mobile, but in order to move your character, you have to write the code each time. So, for every move your character needs to exit from the dungeon, you have to write the code.
Every time you are playing, you are collecting points, so you can buying better weapons and upgrades. Some places can be accessed only if you paid your monthly subscription. Thus, if you finish a level without any error in code, you can win more points.