Computer memory encompasses various data storage technologies including RAM, ROM, and flash memory, which vary in speed, cost, and volatility. It is categorized into primary (volatile) and secondary (non-volatile) memory, where primary memory is accessed directly by the CPU for immediate data, while secondary memory is used for long-term storage. Different types of memory, such as DRAM, SRAM, ROM, and various storage devices like HDDs and SSDs, serve specific roles in computing based on speed, capacity, and data retention capabilities.