What is a processor cache?

Solution 1:

In a computer you have a bunch of different layers of memory, which you can imagine "nearer" or "farther" from processor.

Memories near the processor are fast but small, and memories far from the processor are big but slow.

The faster memory is composed by processor's registries, which can be immediately accessed by the processor. Then you have L1 data cache, which is typically 32K and can be accessed in just one clock cycle, then L2/L3 cache, which are few MB (from 2M to 12M) big and can be accessed in tens of clock cycles. Then comes the main memory, which is far larger (some gigabytes) but are very slow (hundreds of clock cycles to be accessed). Then comes disks, which are hundred of gigabytes big but soooo slow ;)

This is commonly known as memory hierarchy.

What do you want, ideally, are memories as big as disks, but as fast as registers. To come as close as possible to this, data is continually moved from RAM to registers and viceversa.

Who does all of this? Well, the hierarchy is managed in an automatic way from L1 up to main memory by the processor, while main memory and disk is managed by the operating system in cooperation with the processor.

The full story is far more technical and complicated, but I hope this will give you some insights ;)

Solution 2:

A processor cache is a small amount of memory on or near the processor itself that is used to speed up access to data.

Since accesses to RAM are significantly slower than actual data processing, keeping the most recently and frequently used data near or on the processor can significantly increase performance.

While main memory (RAM) can be very large (several gigabytes), the CPU must wait several clock cycles before it can access data from main memory. The CPU cache can be accessed very quickly and is generally used to store the most frequently or recently used data. The larger the cache, the less often the processor will need to access the slower RAM. However, too large a cache may slow access as the processor will need more time to find the data.

For more information, see the Wikipedia article on CPU cache. Feel free to add more details as well as technical information to this answer.