In a multiprogramming-capable system, the jobs which are to be executed are loaded into a pool. Some of those jobs are loaded into main memory, and one is selected from the pool for execution by the CPU. If at some point the program in progress terminates or requires the services of a peripheral device, the control of the CPU is given to the next job in the pool. An important concept in multiprogramming is the degree of multiprogramming.
The degree of multiprogramming describes the maximum number of processes that a single-processor system can accommodate efficiently.There are some of the factors affecting the degree of multiprogramming such as the primary factor is the amount of memory available to be allocated to executing processes. If the amount of memory is too limited, the degree of multiprogramming will be limited because fewer processes will fit in memory.
Another would be the operating system which means by which resources are allocated to processes. If the operating system can not allocate resources to executing processes in a fair and orderly fashion, the system will waste time in reallocation, or process execution could enter into a deadlock state as programs wait for allocated resources to be freed by other blocked processes. Hope this solves your doubt.