If you start to code outside CodeCombat, you will have to learn some more things:
First, you will need a python editor for the platform you'r working on (most linux distributions and macos have it already installed) and you might want to have an IDE (an editor to type your text, as you have it in CodeCombat on the right handside).
"Also, out of code combat, for example what would 'hero' be replaced with?"
Well, you might want to create your own objects with your own variables, togegher with your own methods (you would program them like functions).
As mentioned above, you will probably use code by others, which often is collected in a so-called libary and provides advanced functions, like windows, pushbuttons or dialog boxes for your application.
From CodeCombat, you will learn how coding works and learn a lot of important concepts in programming, as loops, arrays, functions an many more. Moreover, you learn syntax of python (which was great for me), and -most important - you learn how to solve problems with algorithms and programming.
After you have finnished CodeCombat, you can probably very quickly learn new programming languages and deepen you understanding of python by reading other books or webpages.
Just my 2ct.