In the Star Trek universe, the Structural Integrity Field System (or SIF) is an array of multiply redundant power systems designed to provide structural support to a starship's spaceframe to keep it from deforming under the extreme stresses of spaceflight. Basically, the system is a way to keep a starship from deflating like a blimp whenever the sublight drive (impulse engine) is engaged.
How this works is a bit hazy (it's one of those things that needs to be there in theory for the physics to even slightly work) but to put it simply: power conduits run through the a starship's skeletal structure. These conduits feed power from a number of field generators that keep the supports from buckling during relativistic (sublight) flight, akin to feeding power to an electromagnet. The system is designed with numerous redundancies to keep the system up and running during any and all flight operations - a Galaxy Class Starship like the Enterprise-D, for instance, incorporates five SIF generators when two would be more than enough.
Speaking of that particular Enterprise: because the Galaxy Class is essentially two starships joined together as one functional unit (see Saucer Separation for more details on that design aspect) one of the unique challenges faced by her designers was how to keep the field systems functional and safe when operating under independant operation. To that end, the SIF conduits have retractable hardpoints along the docking plane that allow for the transfer of field energy. These hardpoints are capable of passing power from the generators located in the ship's stardrive section up to the saucer or vice versa allowing the whole ship to be stabilized by one section's power generators.
The SIF fulfills the same role during warp flight, but for a slightly different reason - because warp acceleration is non-relativistic there are no classical acceleration problems, however fluctuations in the warp field density can create a subspace shearing effect that imparts a different (though related) kind of structural stress. Yeah, I don't know what that means, either, though I think is has something to do with different parts of the ship being influenced by the warp field in slightly different ways, causing different parts of the spaceframe to behave in different manners at warp.
Needless to say, failure of the SIF is a very, very bad thing.
It should be noted that relativity applies - If the Structural Integrity Field System were ever to fail during high relativistic speed, the thing that would cause damage to the spaceframe wouldn't be the speed, it would be the next acceleration. To that end (and assuming all the generators have failed AND that power could not be immediately restored) the only course of action would be an extremely gradual negative acceleration to a point of relative rest.
This system should not be confused with the Inertial Damping Field System which provides the same kind of support for the crew - the SIF is designed to keep the ship...er, shipshape (sorry), habitable and functioning.
Some specifics taken from the Star Trek: The Next Generation Technical Manual. Most of it's from my head.