OSX is famously proficient at keeping itself in good running condition. I’m not an expert on these matters, but I’m told it’s so efficient as a result of having been built on the very robust UNIX core.
Part of this UNIX legacy is a set of Cron scripts that run every day, week and month, completely in the background. They do things like clear away temp files, rebuild databases, free up memory; stuff like that.
Only problem is, they run at, like, 2:30 in the morning. It is possible to jump start these scripts and run them any time you like though. Why would you need to? A case in point might be when you rip a DVD using HandBrake; after the job (which is very CPU intensive) your CPU fan might be humming away and you’re left with only 30 megs of free RAM, instead of say, a gig of free RAM. This RAM will free up eventually but if you want things ship-shape now, you likely have three choices.
You can press Ctrl-Eject and choose to restart your Mac; do this though and you then need to launch all those apps you always like to have running and then re-open your documents.
You could invoke the necessary Cron scripts using the Terminal. When I was a Windows user, Mac people would scoff our DOS prompt, and I did too. When I switched I swore that I’d never look at a jaggy font with a flashing cursor in a command line window ever again.
Or, you can use something like MainMenu. As you can see, it does all of those arcane system chores, through a nice clean menu. To be honest, I’m scared to try most of the commands that it offers, but I do get great mileage from my Mac by running the daily, weekly and monthly maintenance scripts — from that menu — while my Mac is running (which it almost never is at 2:30 in the morning).