It is functionally sandwiched between the CPU and main memory. In effect, it is a high speed buffer, intended to have program instructions available for the CPU to execute quickly, without delay. Cache memory is analogous to an efficient worker who has all of his most frequently used tools in a tool belt, ready to be used quickly.
Main memory is analogous to a large portable tool box.
A hard disk is analogous to a workshop. Cache memory is often 3x to 5x faster than main memory. Although static RAM is faster than dynamic RAM, it is more expensive. SRAM employs six transistors per bit of memory, whereas DRAM requires only one transistor per bit of memory. A static RAM bit is in essence a flip-flop circuit made with six transistors, very fast and consumes lots of power.