Soooooo...what was wrong with it???? Did you just reboot it and it worked better or did you reinstall the OS?
As for keeping a computer clean...the above suggestions would help...I always recommend putting data on a separate drive if possible...like personal files, music, and all that stuff so it doesn't clutter up the drive that the OS is on...but depending on how big your drive is...
Partitioning drives also helps...and that can be done easy enough with free software...but it's best done before you reinstall the OS...oh, and get more RAM if you havne't done that already...