As "mab01uk" has stated you can buy vehicles back off insurance companies and have them repaired (depending on the category) and you can end up with a cheap car (in some cases) but any repairs should be done by someone who knows what they are doing.
If a vehicle has had a previous right-off marker the insurance companies can argue over the final payout of that vehicle and you may not get the full market / retail value, however I have known this happen to a couple of people who wrote-off cars and then the insurance companies pointed out the previous write-off status one got paid out the full amount what they paid for the vehicle (full retail price) as the didn't know the car was previously damaged as the never had any HPI checks done, The other person got paid out a percentage of the retail price as they knew it was damaged as they had done the HPI checks (knew it had been damaged), got the car inspected properly (everything OK), and got the car cheap initially (the final pay-out was more than what they had initially paid).
You can't deny knowledge off cat C damage anymore these days as they need an inspection to go back on the road and this is stated on the bottom of the new documents (log book).
However if you have a vehicle repaired properly to a high standard you can have an "Autolign Inspection" and once passed the car is classed as back to normal (up-to a standard of an equivalent undamaged vehicle on the road of the same year etc... etc...), this can cost you quite a bit but the car is classed as inspected and Insurance companies etc... etc... pay out the full retail value of a vehicle even though it's been previously damaged.
Another point to remember is, it's hard to get finance (not impossible) on a recorded (write-off) vehicle unless it's been "Autolign Inspected", so they can be a lot harder to sell / trade in as dealers etc... don't want them.