Do I need to insulate the entire basement or just a few walls?
Just insulating the ceiling will keep the ground-floor floors warmer, if you walk around barefoot, but won't save much energy (air-sealing is a better investment for that) or keep the basement any warmer.

If you want to improve the basement climate, any insulation of the walls will help retain a corresponding percentage of the energy you're losing. Air sealing helps a lot here too, as does an indirect-vented boiler or furnace (so you aren't pulling cold air into the basement to make up what's used for combustion).