....Boy!  What to look at is/can be a long list. It would also depend on your willingness to make repairs. If it is rough ,but short money and you are willing to go through it....don't look too close.
   However, assuming that you would like to purchase something that you can immediately put to work; this is where the list gets long.
 check: 
the frame and undercarriage for cracks. If there are welds on the frame, that may be a good indicator of its past life, but also look at the welds....has there been multiple rewelds at the same location? This could just be a consequence of a poor welder or worse. 
Look for worn/ loose pads, make sure the steering works well...the outside track should lock up when turning.
 Make sure the clutch is strong. 
If the rear sprockets are worn to sharp points they will need replacing (depending on how much you intend to work it). 
The pins and bushings on the tracks shouldn't be too worn.(these are the pins connecting each chain link and is driven by the rear sprocket) If the bushing is worn through, it will wear the pin as well. These can be turned 180 degrees by a dealer unless this had already been done which will mean replacement.
Check for sideways wobble in the front idler which would show bearing wear and check wear on the surface of the idler where the chain makes contact, this will wear thin over time and makes it easier to throw a track...not much fun.
Check the bottom idlers for wobble too, and look for chips in the outer flanges. A bad idler may have no bearing left. These can be checked by putting down pressure on the blade and lifting the machine up. (you may have to back off on the track adjusters too) Don't forget to block up the machine while sticking hands in there.
Look for cracked hydraulic hoses, hydraulic leaks,and be sure the blade raises smoothly....no chatter raising. Will the blade remain in the raised position, or does it drop?
Check the cutting edge of the blade for wear, some can be flipped over, if this hasn't been done already. also look at the backing of the cutting edge, if the cutting edge wasn't replaced when worn, the backing will wear also, and there may be little or no metal around the bolt holes.
Look for antifreeze leakage and check the fan for sideways wobble which would show a worn water pump. 
When you look at the motor, it is pretty much the same as anything else....check for oil leaks, smoking, ease of starting cold and hot, hose condition,fuel leaks, cracks, repairs on the block, missing/ broken bolts, or bolts welded in and misc. "baling wire" type repairs.
        I am sure there are things I have missed.... perhaps others can fill in the blanks, but this will get you started. 
                                       Cal