You are correct. The debug configuration has settings that builds your program for debugging. The release configuration builds your program so that it can be Flashed or burned onto a product board.
Generally, the debug configuration turns off most optimizations (so that the machine code bears some semblance to the flow of the source code), and generates symbolic information that you use to debug the program. Generally, the release configuration turns on optimizations to help reduce the code footprint or to improve performance, and does not generate symbolic information, since it's not going to be used in a shipping product.
You can adjust the settings of these configurations to suit your needs, but the default settings are usually a good starting point.
---Tom