Think of top like â€˜Task Managerâ€™ in Windows or â€˜Activity Monitorâ€™ in Mac OS X. Simply run:
And you are shown your running processes. It is a realtime view unlike â€˜psâ€™ which also shows your running processes. To quit top hit the â€˜qâ€™ key. The first column displayed in top is the PID. Every process has a unique ID and you use this ID if you need to kill a process. Do not just kill processes for fun you should only do this if you know for sure there wonâ€™t be any adverse effects:
kill -9 1234
Where the -9 flag is the SIGKILL signal that no process can ignore. It will force quit the process with PID â€™1234â€². There are many other signals you can use on a process that you can see here.