Healthy lungs are very compliant by default. Only certain chronic conditions make them stiff. Things like fibrosis (scarring), certain autoimmune conditions. You basically treat the cause of the fibrosis or the autoimmune disease. Not much you can really do to change this before hand. Counter to what many may think, smoker lungs tend to be veeeery pliable. Too compliant. I call them floppy lungs. This is a different problem all together.
During an acute insult, such as pneumonia (bacterial, viral), or pneumonitis (inflammation from a drug or from aspirating gastric contents) the lungs become acutely stiff. This is part of what we call ARDS, acute respiratory distress syndrome. When intubated, we do what
@Robconn mentioned. Basically try and use low pressures and low volumes to minimize further insult to the lungs.
Another way to understand this, is to think about how we breath naturally and how we breath on the vent. Naturally, our diaphragm and intercostal muscles contract and expand the rib cage. Negative pressure is created inside the chest and air is basically sucked into the lungs. Stiff lungs won't expand as much but won't be damaged by this method. On the vent, we PUSH a volume of air at a certain pressure. Positive pressure breathing. This can damage an otherwise healthy lung if you are not careful, and will create big issues on stiff lungs.
Since I've gone full nerd, I always enjoy telling people that breathing out is a passive maneuver. There are no "breathing out" muscles. You can squeeze all you want but you really aren't pushing air out. You are basically removing any forces that may want to expand the lungs.