They are located inside the processor. They are the quickest memory and are then located at the top of the memory hierarchy.
Zoom of CPU register of the Z80 processor (Source)
Registers in a CPU (as in every device) are used as:
One standard function of a register is to define the input and output operand of an instruction. See Device interface via Register
Example:
A processor have:
Register type hierarchy: