for any PC CPUs :
The Cache is using the SRAM (Static Random Access Memory) memory type, the most expensive and fastest memory. That type of RAM work with a simply open/close fonction , like a switch , open = 0 (no contact) , closed = 1 (contact). The L1 cache is on the CPU , it is used, as BGNG said, to store the commands in queue for the Processing unit to execute. It is the fastest one since it's on the CPU, so it demands less time to get the information. On another side, the L2 cache isn't really on the CPU, it's the same type of SRAM but a bit slower and located on the motherboard. It's used when the L1 cache is full or to put instructions that are less important then the other ones.