Primary memory (RAM and ROM) is the working memory of a computer that holds the data and instructions currently being processed. It is volatile and has limited capacity. Secondary memory (HDD, DVD, etc.) is used for permanent storage of large amounts of data and retains data even when powered off. RAM is faster than ROM but volatile, while ROM is non-volatile but slower and used for startup processes. Primary memory is accessed directly by the CPU while secondary memory requires data to be copied to primary memory first before CPU can access it.