Cache memory acts as a buffer between the CPU and the main memory. Its purpose is to reduce the average time to access data from main memory by keeping a copy of frequently used data closer to the CPU.