What can be done to save an old macbook? I have a 2008 Macbook 13.3 inch (Model number: MB061LL/A) whose battery stopped working yesterday. It also has frequent kernel panics, so although the cosmetic condition is pretty good, its market value seems zero. I was happy with it for the first one year and a half, but then the kernel panics started and my warranty had been void. 

I would like to keep this as a functioning machine and an alternative laptop. What are some options to salavage it? (Parts to buy, etc.)
This is hard to guess, as you can imagine. If the machine had kernel panics the usual (but not only) suspects are RAM chips. You can probably try new RAM (google for OWC, CRUCIAL, etc.). The battery can be replaced at an Apple Store (of course you'll have to pay for it). The Hard Drive could be a problem too, so maybe if you had to replace it, adding an SSD instead would boost the performance. 

In the end, there's little else you can replace without having to ditch the entire motherboard, and that's probably not worth the cost outside the warranty. 

Running a Linux (more tolerant sometimes with dubious RAM/Hardware in general) is a decent alternative. Ubuntu (among others) is a decent OS for casual users.