Think differently:
Every process has a number of file descriptors. The first three of those are, by convention, stdin, stdout, and stderr.
When you run a process, you can "point" those descriptors to different places.
When you run a shell in an IDE, the IDE points those to the console the IDE provides.
When you run a shell in an xterm, the xterm points those to the window/keyboard interaction the xterm provides.
When you run a shell via a serial port (common for embedded systems), then those point to the serial port.
When you run a shell from a shell and redirect them, you can point them to a file.
In the same way, when you run some other process (program) from a shell, you can redirect stdin and stdout for this program, e.g. via >
and <
.
"STDIN refers to command line prompt." makes no sense. You can say that the shell process itself has those descriptors, they refer to whatever was set when the shell was invoked, and the shell can inherit those to other programs that are started from the shell (or use different ones for those).