Read these articles : Use Activity Monitor on your Mac - Apple Support
: If kernel_task is using a large percentage of your Mac CPU - Apple Support
One of the functions of the kernel task process is to help manage the temperature of your CPU.
Activity Monitor might show that a system process named kernel_task is using a large percentage of your CPU, and during this time you might notice more fan activity.
One of the functions of kernel_task is to help manage CPU temperature by making the CPU less available to processes that are using it intensely. In other words, kernel_task responds to conditions that cause your CPU to become too hot, even if your Mac doesn't feel hot to you. It does not itself cause those conditions. When the CPU temperature decreases, kernel_task automatically reduces its activity.
See how apps affect Mac performance, battery runtime, temperature, and fan activity - Apple Support
To quit a process, first try quitting it normally. For example, quit Safari by switching to Safari and choosing Safari > Quit Safari.
If you can't quit a process normally, you can use Activity Monitor to force it to quit. Save any documents related to the process, then select the process in Activity Monitor and choose View > Quit Process.
If you don't recognize the name of a process, it might belong to macOS or another process that you do recognize. To see the relationships between processes, choose View > All Processes, Hierarchically. If you see that a process belongs to an app, such as Safari or Mail, quit the app before deciding whether to quit any of its processes.
To help avoid malfunctioning processes, keep your apps, plug-ins, and operating system up to date.