You can monitor your computers CPU and Memory usage by running Activity Monitor. That is located in the Applications folder under "Utilities".
This is what I did to improve my iMac's performance:
I restarted my computer. While my computer was restarting I held down the Command+R keys. This booted my computer into Recovery Mode. I used Disk Utility and clicked "Repair Disk". I restarted and opened up Terminal. That is also located in the Applications folder under "Utilities". I typed "sudo purge" and hit enter. This purged my memory. I then typed rm "rm ~/Library/Preferences/com.apple.finder.plist&&killall Finder" and this rebuilt the finder.plist file." I then typed "exit" and hit enter, this ended the processes running in Terminal and I exited the program. My CPU usage is now under 10%. My Memory usage is 2.05 GB. My Swap Memory usage is 0 bytes. This fixed the problem.
The only thing is, that you need to do this every time the computer starts freezing up and crashing. I'm having to do this every few minutes.
Update 2/9/2014: I have come to realize that the problem is not with the CPU or the memory. Although, performing the minor fix I mentioned before did help at first, it is no longer working. My iMac becomes unresponsive anytime I try to use Finder. The problem is clearly with Finder. Even when my iMac is sitting idle with no applications running, Finder uses up enormous amounts of processing power. Earlier, I tried moving files from one folder to another and Finder used almost 200% of my iMac's processing power. Just now, I tried opening a Folder. Just that action alone caused Finder to use up 115% of my CPU and become unresponsive. Yes, it's possible for Finder to use up over 100% of my processor since it's a dual chipset. My iMac keeps becoming completely unresponsive and it doesn't take much to push Finder over the edge.