Don has good points.
Others are:
engine condition, careful visual inspection of everything in the compartment, pull a compression check, preferably differential comp check, this will tell you all sortsa information, listen to intake, exhaust, also at the oil filler in valve cover. This will indicate different types of wear ( worn rings, burned valves, hole in piston,which valve is damaged ) Run engine to operating temps then diff check each cylinder. Check for start up oil pressure, then warm oil pressure. Look at spark plugs at same time, tells a lot.
R&R the oil filter, cut it open and inspect for metal, same on the hydraulic tank.
Belt condition.
Hyd hose condition.
Electrical check, battery, wiring, does it charge, pull an amp check on the battry,turn on all electrics, condition of insulation, shorts, burned or loose wiring, is everything nicely bundled or was it slopped in, tells me a lot about previous owners or mechanics.
Hydraulics, cold ops and warm/hot ops. Noises ?
Does it act sluggish or as it should ?
Oil/lube in transfer case, differentials, transmission, look for making metal
Correct viscosity ?
Does it look like it's been greased ?
U-joints, same check. I prefer to see grease on all fittings , some think little grease is a good thing, I don't. I'm not concerned with gittin grease on me when I work on equipment, I'm a mechanic, but some folks are,... ahh, cleaner than me when we work...
Service records, when, what, how often if repeated, does it reflect maintenance intervals ? How many hours on machine ? Partial hours on components ?
What type of use did it see ?
Who is the owner ? Does he/she seem conservative about how machine was operated or one of them " less see what this thing can do " kinda folks.
Price ? Do some homework on what comparable equipment goes for.
lots of things to look at, keep ya busy for awhile. Plan on a full day, maybe you'll see the things that say " Not this machine "