Intel CPUs use a feature called Turbo Boost - because CPU clock speeds can be scaled up and down according to demand. Turbo Boost allows some or all cores to be set higher than the base clock, if there is demand, and power/heat limits are not being exceeded.
It happens automatically - grab some monitoring software like HWMonitor and watch your clock speeds go up and down as you use the PC.