Primarily two types:
The smaller the memory units, the faster it is but also the more expensive it is. So, if we arrange the various different types of memory units by their size and access times, we get sort of a pyramid with the smaller tip being Registers and the base being something like ROM.
When data has to be accessed, the CPU queries in the order of hierarchy, until the queried data is returned. The data is then loaded into cache memory.
How memory is organized and used is discussed in Memory organization.