A spoiler is an aerodynamic device attached to an automobile whose intended design function is to 'spoil' unfavorable air movement across a body of a vehicle of some kind in motion. This can result in improved vehicle stability by decreasing lift or decreasing drag that may cause unpredictable handling in a car at speed. Spoilers are often fitted to race and high-performance sports cars, although they have become common on passenger vehicles, as well. Some spoilers are added to cars primarily for styling purposes and have either little aerodynamic benefit or even make the aerodynamics worse.
Spoilers for automobiles are often incorrectly confused with, or even used interchangeably with wings. Automotive wings are devices whose intended design is to actually generate downforce as air passes around them, not simply disrupt existing airflow patterns.
Operation
Spoilers generally work by disrupting the airflow going over a moving vehicle. This disruption's primary purpose is to reduce the amount of lift or turbulence naturally generated by the shape of the vehicle while it is moving.
In cars, the result is increasing the contact between the tire and the road surface, thereby increasing traction. This increase in traction allows a vehicle in motion to brake, turn, and accelerate with more stability. Additionally, this is accompanied by an increase in aerodynamic drag.
In nearly all cases, drag increases as the speed of the vehicle increases. Thus, some spoilers that are effective at very low speeds often generate excessive drag at high speeds, and spoilers that work well at high speeds are often ineffective while moving slowly.
source:wikipedia