Each window in the cockpit has it's own electric heat, to prevent fogging and icing inflight. Sometimes the heater for a window fails, or it overheats. The rapid temperature change can crack a windshield. Since these windows are very thick multiple layers of glass, where the crack is is very important. If I remember correctly, from my KC
-135 days, when you see a crack, you draw a grease pencil mark on the crack, then lean over to one side or the other to determine weather the crack is on the inner or outer paine of glass. If the crack is on the inner paine, you must reduce the cabin pressures and land, If on the outer paine, you could reduce the cabin pressure and continue the mission. But, once on the ground, the aircraft is grounded the windshield is replaced, then another 24 hours to allow the sealant to cure.
But, things that can crack a window include bird strikes, rapid temperature changes, hail, and bullets.