Most ships in Star Wars are equipped with deflector shields of some kind to protect against enemy attacks and navigational hazards.
Deflector shields attempt to redirect incoming attacks to avoid impact with the hull. The energy of any incoming attacks that cannot be completely deflected is absorbed and stored in heat sinks. The shields can become overloaded if the system absorbs heat more quickly than it can be radiated away. The shield system must be shut down while the systems cool off, or the projectors will burn out and require replacement.
Some starships can make use of the energy absorbed from incoming attacks, at least to a certain extent. For instance, the Millennium Falcon's shield system could redirect some of the absorbed energy to its engines and guns.
Some high-performance fighter craft omit one or more types of shielding to improve acceleration by reducing mass and power drain.
Other Shield Types
Another type of shielding protects against relativistic effects during the jump to hyperspace. Although not lethal, accidents involving these shields have been known to cause passengers to emerge out of hyperspace about 200 years after their departure due to time dilation effects. 
A warship in Star Wars can generally survive several hits from another warship of similar size before sustaining damage. Reducing the range between warships in battle appears to reduce the amount of time that shields can withstand enemy fire.
Like the shields of most settings, shields generally don't perform as well against collisions with massive objects as they do against weapon fire, presumably due to momentum transfer from the impactor to the shield generator.
While the weapons of fighters are generally not powerful enough to penetrate the shields of a large capital ship, fighters remain a threat to warships in battle, leading to speculation that fighters can slip through shields if their relative velocity is low enough, allowing them to fire their weapons directly at the targets hull.
Characters have occasionally mentioned "angling" deflector shields, suggesting that shield protection can be optimized against attacks from a particular direction, making their protection sub-optimal against fire from other directions.