RAM is the internal memory of a CPU that temporarily stores data, programs, and results. It is volatile memory that loses its contents when power is removed. RAM provides random access to data, meaning any storage location can be accessed as quickly as any other. There are two main types of RAM: static RAM (SRAM) and dynamic RAM (DRAM). SRAM retains its contents as long as power is supplied but is more expensive, while DRAM must be continually refreshed to maintain data but is cheaper and smaller.