It all starts with precision monitoring and measurements down to Milliseconds.
As example Intel has made a tool to monitor the Intel CPU parameters.
It displays the Power the Frequency and the Temp.
The Power usage and the Temperature are products of the Frequency (the speed), or the amount of data processed.
The sampling rate is Milliseconds and the power is in Watts, and it measures the Total Power for the CPU while the Activity monitor breaks it down by Application/Process.
Here is a article from Apple about power management/consumption that goes in to bit more details how is power managed.
In summary, using the ms power measurement one is able to better control the overall power consumption.
Using the above information on per Application and the resulting cumulative Power usage Apple has implemented the Timer Coalescing and the App Nap features to manage Power consumption resulting in the Chart below.
To see more information on above charts visit this article.
Since the CPU control's activity including RAM management and disk read/writes,Network Card and others for example improving RAM management also reduces power consumption that occurs by to frequent disk R/W activity.
There are many aspects of power management, and they are a combination of very accurate measurement and software designs to reduce the power consumption.
Some examples are:
App Nap feature
Timer Coalescing feature PDF
RAM management feature