Hi!
There are different methods to do that and depend upon the particular microcontroller that you are using.e.g in certain microcontrollers individual peripherals can be enabled and disabled e.g AVR, PIC24F etc.
In certain microcontrollers you can dynamically switch the processor clock to different sources and can scale down processor frequency to reduce power consumption.
Another method is the sleep and powerdown mode supported by most microcontrollers.
Before using any of these features for reducing power consumption be careful about there effects on processor operation. Since most of the devices wakeup from powerdown mode only by resetting the device which may not be desireable.
Regards.