So this might be the dumbest question you've ever heard. Im very new to C++ and i was wondering; is C++ programs only executed in cmd? If not, how can you change it?
There is no limit to what you can do with C++. For example, the Windows operating system is written in it, most Windows applications are written in it, and most commercial games are written in it.
The cmd (or console I presume you mean) is ideal for learning the C/C++ language and once you are comfortable with C++ you then move on to learning Windows programming (assuming your on Windows) using the various API/Frameworks around.
If you are a beginner then I wouldn't suggest trying Windows programming just yet.