Turbo boost is essentially inbuilt overclocking that takes few things into account:
Temperature of CPU must be below thermal throttling
CPU will overclock 1 to 4 cores (or more in most recent CPU's) over their base clock, this usually is due to computer using 1 to 3 cores completely and rest stay mostly idle, allowing other cores to run faster while still being below designed thermal limit.
turboboosting whole CPU is different matter though and usually wont last long unless you have a good cooler to keep the temperatures in check.
In essence, CPU doesn't really "use" much more power than normal and doesn't produce more heat than normal, it just sees room for improvement due to parts of CPU being idle. This has so far worked due to games being 2 to 4 threads only, with 4 to 8 core processors being half idle, giving boost to cores that are in use.
Of course, overclockable motherboard/CPU and all that changes since you can change the limits.