Buggered screws and missing or non-original parts. Even if a gun has had to have work done on it, competent gunsmiths can dissasemble and re-assemble without messing things up. Buggered screws, vise (sometimes vise grip) scars are bad ju-ju. Bubba has ahold of that one.
Otherwise, it totally depends on what it is. A thorough visual inspection will reveal wear on bearing surfaces, rust, re-blue, dents & dings. The interior of the bore absolutely tells if the gun's been maintained Pits in the bore regardless of other signs tell the story. Hairline cracks in wooden stocks are sometimes easily repaired, but missing wood ...nope.
There are certain calibers that are known to burn out rifle barrels after a relatively few rounds. Research this. Old shotguns (16 gauge for example) were sold in varying chamber lengths - odd sizes are not easily found. Old .22's fired with corrosive .22 shorts often have chambers ruined for longs or long rifles. Anyway ...if in doubt, find someone you know is knowledgeable and ask before you buy.
"Custom" features ...may have cost a previous owner a pretty penny, but usually aren't something the next person is looking for. Generally if, when you cycle the action gently, and everything works smoothly (not sloppy), I will consider it a possibility. Right now, the woods are full of "put-together" AR's. I've heard sellers say "I built this one." Uh ...no, you put a bunch of parts together. What's actually in it and IF everything works is a gamble. I buy as close to factory original as possible Hope that helps.