You can spot repairs or evidence if certain areas look like they have been worked on. Weld spots, weld coating, tapping areas for bondo, looking for shattered glass in tight spaces, etc. But it's difficult to figure out the work if it's been in another accident unless you can peel everything back and take a closer inspection. You would want someone with experience to go through the automobile and check for obvious signs.
If they are trying to sell you a car that is damaged then you decide if you want to buy it or not. Get someone with experience and a cost breakdown and someone who can negotiate to get it fixed. There's the aspect of getting a cheaper/ damaged car but many times it's just not worth the hassle.