A force field is a volume of space in which objects are subjected to physical force depending on their position in the space. For example, massive objects such as planets create a gravity force field around them that pulls other matter and energy toward them. Similarly, magnets apply force to ferrous metal objects or charged objects around them. Such fields diminish in magnitude as distance to the source increases.
In Science Fiction
In Star Trek, "force fields" in the shape of flat planes are often used as barriers. For example, if the starship sustains damage that breaches the hull, force fields will be projected to cover the breach to prevent the ship from depressurizing.
Force fields are also used for ship security. Force fields can be activated at arbitrary locations around the ship to contain intruders or block access to sensitive areas of the ship. Unfortunately, the circuits that power and control these force fields are often accessible from the "wrong" side of the barrier, so a knowledgeable intruder can disable them by using a weapon to break the circuit.
Force fields are also used to contain dangerous pathogens in their sickbays and sometimes to contain dangerous materials in cargo areas. Such reliance is dangerous, as a power failure to the force field could easily result in contamination spreading throughout the ship.