I'm not sure what's wrong with my computer exactly, but i have some sort of idea. Sometimes it freezes then it makes this weird noise and I have to shut it off manually. The computer is about 4 years old. I suspect it's the ram or my cpu is overheating, but i touched the computer and its cool and not super hot.
Download a program called memtester86+ and run it for several hours. This will test your RAM. If the test freezes, or if any errors are found during the testing, then you have bad RAM. I recommend running the test on each stick of RAM versus all the RAM at once.
Have you tried running any anti virus programs. Try downloading Avast for anti virus and Malwarebytes for malware and trojans. See if that helps. Also download CPUID Hardwaremonitor to test your temps if you havent done that yet.
if my cpu does overheat what can i do to fix it? Other then buying a new computer.
You don't need to buy a new a computer. All you have to do is dust everything out with compressed. Take off the fan and heatsink and dust them out too. Re-apply thermal paste and see if that helps. If it doesn't then I would get a good aftermarket fan/heatsink.