If an insurance company ‘writes off’ a car, it is placed in one of four categories rated from A to D, with A the most severely damaged. Category A and B cars are so badly damaged, and we would strongly advise you to not buy one, as insurance companies reckon they could not be repaired.
It is however perfectly acceptable to buy a car from Category C or D. In both cases, they reflect a car that was repairable, but the insurers chose not to, probably because they thought it was cheaper to replace the car than repair it. In that event, they’ll often sell the car on for salvage, when someone else may choose to repair the car. If the car is repaired properly, there’s no reason you shouldn’t buy and run it. The attraction of a repaired Cat C/D car is that it will cost less to buy than the equivalent non-written off car, but you must make sure that car has been properly repaired.