If you are unlucky enough to die, be killed, hunted down like the dog you are, or just slammed into a space station by a useless docking computer, then you will be given an opportunity to rebuy your ship by paying an 'insurance' cost relative to the ships purchase cost. The following table shows the approximate purchase and insurance cost for ships and equipment.
Also note that the insurance is 5% of the cost of the ship, and all other items.