Primary memory is the memory that is always present on the main mother board along with the processor (CPU). The CPU can access/read/modify the data directly during the execution of an instruction. The size of the main memory can be limited to a maximum. The main memory is a very fast data storage device. Usually the main memory loses data in it, when the computer is switched off. A program or application or data is first loaded from a secondary memory or disk before the CPU can access it. The operating system like windows, unix are first loaded into the main memory from hard disk. Then the computer functions as the processor executes OS from the main memory.
The instructions, data, application softwares, operating system are all stored in the secondary memory devices. These devices do not lose data when power is switched off. These are hard disk, CD ROM, DVD, flash pen drive etc. The capacities of these devices are much higher than those of the main memory. They are cheaper also. Some Secondary memory devices can be hot pluggable or removable too. But primary memory is hardwired.