There are a plethora of things you should check prior to buying the vehicle, assuming you haven't already had a mechanic inspect the vehicle beforehand. Even if a vehicle is 'running', it does not always mean it is running well.
Suspension, steering and braking component wear and tear is something you should always look out for, e.g. sway bar link knocking, control arm play or steering rack and cv joint boot cracks/leaks are examples of things to check for.
How much brake material is left on the current pads? What is the condition of the rotors? Are there any heat marks, cracks, lips? How thick are they compared to manufacturer's minimum specifications?
Seals around doors, windows and boots are also something you should consider. Do they leak? Are they desolating?
Leaks around the engine bay are a definite must-look-out-for. Sometimes sellers will clean up any sweating/weeping prior to you coming to personally inspect or buy. If they haven't, what is leaking, where from, and why? This can bite you in the ass in the future if you overlook it.
There is so much more to check for prior to buying a car. You do not have to necessarily fix it all, but it gives you perspective as to how much you may need to invest in the near future and what you must invest now to ensure the car does not undergo further damage as you drive it.
Taking it to a mechanic that is experienced in inspections may be a pain in the ass, but it can definitely save you from any nasty surprises or headaches.
In terms of what you can do immediately, as Pete recommends, change all fluids in the vehicle. Don't forget the washer reservoir, water does get stale over time. Drain the fuel tank of the dirty fuel and add new one in. Do a major service.
Clean out the interior of the vehicle. Even if it looks clean, mildew, mould or dust would may have built up over time and you do not want to be a in the car with those things present. Give the upholstery a good scrubbing down with diluted citrus cleaner and steam it as well if possible.
Replace the windscreen wipers. Over time they will have carbonized and if you ever use them, they will streak and make awful noises.
See if you can find any insects living in the nooks and crannies of the car. Probably want to kill them.
If you care for the exterior of the vehicle, give the paint a proper wash, clay the surface and apply a new coat of wax or sealant.