Both, depending on what part of it actually goes bad.
For me, it's almost always been a matter of the starter cranking slower and slower each startup, then finally the battery is just toast after sitting overnight. I'll replace the battery, and it'll be dead the next time I go to start the car.
If you're replacing it, I recommend doing the 3g upgrade if you haven't already.