A vehicle with a Cat C or D marker against it does not necessarily have to have been involved in a crash - it depends on the age of the vehicle don't forget, as it doesn't take much to write off something if it's an older car.
It's also worth remembering that the writeoff might not have been caused by a crash, but instead paint damage from vandalism, smashed windows, that kind of thing. Even if it was a crash it may have been something as simple as a damaged wing and alloy.
Being Cat C means that it wasn't economical to fix the car with new parts, inclusive of labour rates, but it could still be repaired to a satisfactory state if desired.
If you HPI the vehicle it will tell you when it was written off, which will enable you (if the current owner doesn't know) to make some judgement as to how much damage was done - i.e. if it was written off when it was a year old, then it was some major damage - yet if it was done when it was 7 years old then the damage was probably relatively light. It's a big assumption to make though so just look round it very carefully and try to assess what's actually happened to it.
There are loads of cars out there though, so very rarely is it worth dealing with a writeoff unless it's some kind of super-bargain that you intend to hang onto, or you don't mind if you make a loss on it.