Your Mac has sensors that respond when they detect temperature changes inside your computer, turning on fans to bring cooling airflow to critical components.
About fan noise
If your computer's processor is working on intensive tasks—such as compressing HD video or playing a graphics-heavy game—the fans run faster to provide additional airflow. You might hear fan noise when this happens, especially if you're in a quiet environment. This rushing-air sound is a normal part of the cooling process.
Ambient temperature, the temperature outside the computer, also plays a role in the fans' responsiveness. If the ambient temperature is high, the fans turn on sooner and run faster.
Make sure the vents on your Mac aren't blocked
Mac computers have vents that let its fans bring in cool air and expel hot air. Make sure that the vents aren't blocked to allow your computer to perform at its best.
On Mac notebooks, the vents are along the side and in the back. iMac computers have vents along the bottom edge and on the back. Mac mini models bring in cool air from beneath the computer and vent hot air from the back. Mac Pro (Late 2013) brings in cool air through vents at the bottom of the computer and sends out hot air from the top.
The surface your Mac rests on can block its vents, affecting fan behavior. If you use your computer on a soft surface like a couch, pillow, bed, or your lap, its fans might run more. Using your Mac on a hard, flat surface like a table or desk is best for temperature control.
If the fans in your Mac run fast even when the computer isn't experiencing heavy usage and is properly ventilated, you might need to reset the System Management Controller (SMC) on your Mac.
Learn more about the operating temperature of Apple notebook computers.