I would try a few things
First, check if ram is also being used, check the clock speed of the cpu while it is at 100% and check task manager for the program that is using it most.
Once you do that there are a few things you can do. If you do end up finding the program and its a program you trust try to go to the support form for the program and see why it is acting in a way that is using 100% of your CPU.
The next and most likely scenario though is that it is malware, so you should still do a scan with Malwarebytes to be safe. And depending on the malware you have on the drive, you might need to hotswap it into another computer and scan it there so that the malware (if it does) doesn't replicate its self or stop anything from removing it.
It could also be throttling as well. What are the temps and when was the last time you installed the cpu, the thermal paste might need a change.