A fail-safe was a type of safety system which activated in the case of failure, or a type of device which prevented a dangerous thing from occurring.
In 2364, Captain Jean-Luc Picard asked for an explanation from USS Enterprise-D's computer for the red alert. The computer responded that it was initiated as a programmed response to a situation where the magnetic field containing the antimatter had weakened and there was no fail-safe available. (TNG: "11001001")
In 3189, Adira planted a device into a console in USS Discovery's engineering test bay alpha. This device accessed the deflector shield systems of the starship. If the device was disabled, its fail safe would activate, resulting in the shutting down of the ship's shield systems. (DIS: "People of Earth")