Best thing you can do is backup any files you need to keep, make sure you have copies of any apps and do a complete wipe and reinstall of osx.
Failing that there are tools such as Cleanmymac which will get rid of junk. Have you updated to Mavericks yet? Get more ram…visit the Crucial website to run a test to see what you can have in your machine.