An Inertial Damping Field System (or IDF) is one of those things that exist aboard starships in the Star Trek universe because the laws of physics say they have to; it's also one of those things that the writers have absolutely no concrete way of explaining because the technology is, as of now, completely unforseeable (see: Heisenberg Compensator). This unfortunately makes the system a bit difficult to describe. Nevertheless; here we go.

When a starship (or any other object) accelerates there is an inertial force to be overcome to get the thing moving. Any objects contained within the original object, however, are going to want to stay right where they are. If the ship accelerates slowly enough the inertial force is minimal. If however the starship accelerates too quickly, the crew would end up splattered against the closest fore-facing bulkhead. Starships routinely jump from (relative) rest to many hundreds of times the speed of light - anything not rigidly nailed down (like the crew's internal organs) would be atomized.

Hence the IDF. The Inertial Damping Field is a forcefield system generated throughout all the habitable areas of a starship designed to counteract this inertial force...somehow. Apparently the forcefields generate an opposing force to the inertial force that keeps things in one piece. How this works is rather thoroughly glossed over.

It should be noted that, while the system does an excellent job coping with whatever accelerations it is presented with, there is a lag (a tiny one, way under a second) that occurs during extreme maneuvering. It is for this reason that the crew is occasionally thrown over railings and the like during battles. It's a technological justification for a plot device, but admittedly a clever one. Realistically, that fraction of a second is all Newton would need to cream the lot of 'em.

The IDF system on most starships has built in multiple redundancies (including but not limited to its own backup power generators) to keep it functioning under practically any conditions. It's one of those things that's only noticed (however briefly) when it fails; it is otherwise taken completely for granted.

The IDF should not be confused with the SIF (Structural Integrity Field System) which keeps the ship in one piece while accelerating - the IDF is there specifically for the crew.

Some info taken from the Star Trek: The Next Generation Technical Manual. Most of it's from my head.