When I'm docked in a station with repair facilities, click "repair all", and then go into the repair screen, I still often see two things available to spend money on repairing: "paintwork" and "ship integrity", with ship integrity in a special little thing at the top. Usually I see it in the 98%-100% range and I'll throw some credits at it now and then. At one point, after a 15-20 minute slog to a distant station, I noticed that it was down to 22% (and I don't think it was below 98% just a few jumps back) and cost quite a bit to repair (more than the rares bought there got me when sold 130LY away).
What is that "ship integrity"? How does it get reduced in the first place? What happens if it's at 22%? What happens if it reaches 0%?