The kernel is using excessive processor cycles. Below are some possible causes for the condition.
Throttling
When it gets high temperature readings from the hardware, or low voltage readings from the battery of a MacBook, the kernel may try to compensate by interrupting the processor(s) to slow them down and reduce power consumption. This condition can be due to:
☞ a buildup of dust on the logic board
☞ high ambient temperature
☞ a worn-out or faulty battery in a portable
☞ the malfunction of a cooling fan, a temperature sensor, a voltage sensor, or some other internal component
Note that if the problem is caused by a sensor, there may be no actual overheating or undervoltage.
If the computer is portable, test with and without the AC adapter connected. If kernel_task hogs the processor only on AC power, charging is causing the machine to heat up. That behavior may be normal for some models, but it may also be an indication of a hardware fault.
Apple Diagnostics or the Apple Hardware Test, though not very reliable, is sometimes able to detect a fault. For more thorough hardware testing, make a "Genius" appointment at an Apple Store, or go to another authorized service provider.
If nothing is wrong with the hardware, then whatever you can do to improve cooling may help.
Installed software
User-installed software that includes a device driver or other kernel code may thrash the kernel. That category includes virtualization software, such as Parallels and VMware, as well as most commercial "anti-virus" products. Some system-monitoring applications, such as "iStat," can also contribute to the problem. You can test for this possibility by completely disabling or removing the software according to the developer's instructions, or starting in safe mode. Note, however, that disabling a system modification without removing it or testing in safe mode may not be as easy as you think.
Corrupt NVRAM or SMC data
Sometimes the problem is cleared up by resetting the NVRAM or the SMC.
External display
Connecting an external display to some MacBook Pro models while the lid is open may cause this issue. If applicable, use the external display in clamshell mode.