If you have noticed that your Mac system has started to oftentimes run slowly or even freeze for multiple seconds entirely, it is usually a sign that the system is running low on resources, most often the CPU or RAM has reached its available capacity. Sometimes the culprit could be a rogue application that has managed to sneak itself unnoticed onto the system but it could as easily be a malfunctioning process that has started hogging an abnormal amount of system resources. In the vast majority of cases, simply stopping the process should be enough to resolve the issue. Outlined below are two methods to track and kill such processes - one uses Activity Monitor while the other takes advantage of Mac's Terminal application.
The Activity Monitor is a convenient utility that allows users to see all currently running processes, as well as various other system information such as CPU cycles, RAM usage and more. To start Activity Monitor, go to your Applications folder, select Utilities, and look for the application. Once the Activity Monitor window shows up, look through the list of active processes for any that take up sizable chunks of CPU power. To sort the list accordingly, click the CPU column header. To stop a process, select it, and click on the 'Quit Process' button in the toolbar.
The other method relies on the Terminal application that comes with any Mac system. To open it, go to your Applications folder, followed by Utilities. Locate Terminal and execute it. When the application's window launches, type top and press Return on your keyboard. You will be presented with a list of all currently active processes and the respective CPU cycles that are being used. Scan the list and take note of any process that is hogging an abnormal amount of CPU cycles. Look at that process' PID as you will need it. Now, type the kill -9 command followed by the PID and press Return on your keyboard.