I don't know whether it is RAM or cache; I can say that isn't the registers since their memory capacity is very small.
It's the RAM.
But further, in order to enhance speed, the CACHE stores a shadow of the RAM content, so it may hold a copy of the program as well (similarly, the RAM has a copy of the program that previously was stored on the hard-drive).
Eventually, parts of the code goes into the CPU and gets stored in one of its registers (not the general purpose ones, but rather some designated registers you have no access to; just think about them as flip-flops). From that point, the program is being executed, one instruction at a time, by the CPU hardware.
This is a very ambiguous question. The whole program will be stored on a local hard drive or a remote server or some other secondary storage device such as a flash drive. At run time some part of the program will be copied into RAM, but not necessarily the whole program. It is the job of the operating system to make sure that RAM contains a copy of the next set of instructions or data that the program needs - this task is called "memory management" or "paging".
From RAM or "main memory", individual instructions will then be copied into instruction cache memory, into a series of pipelining buffer registers and finally into the instruction register which holds the instruction that is currenttly being executed.
A program will remain in secondary memory (HDD) is not running or in Primary memory (RAM, CACHE) if ran recently or expected to run. A program that is being executed is called a process. For every process, a Process Control Block is created and kept in primary memory (RAM). The PCB contains pointers to the start and the current line in the program to be executed .
Your question doesn’t make sense. There is no “memory” dedicated to holding “the copy of the program to be executed”.
On a modern computer there isn’t one program to be executed. Normally I have a dozen or two programs running at the same time.
Each program is stored on the hard drive, SSD drive or flash drive. The OS assigns address space to the program, then the whole program is mapped to that address space. At that point, none of the program is in RAM. As instructions are to be executed, the OS automatically loads those instructions into RAM. Cache memory holds copies of the least recently used data in RAM. Instructions are removed from cache or RAM if they have not been used for a while.
Summary: It’s all over the place.