I’ll jump in. Wings on the back or front of cars are like upside-down airplane wings. They force air up, producing downforce on the car. This slows the car, but the downforce makes it easier to turn while going fast.
A spoiler is a kind of air blocker, that can take many shapes. It acts to prevent airflow over a part of the car body that creates unfavorable drag or turbulence, improving laminar airflow over the vehicle, thus it slips through the air with less resistance.
When used on a spacecraft, they are pure magic. You can’t have too many wings or spoilers on a spacecraft.
Spoiler - its all in the name. When air flows over a moving car and smoothly off the back end, it actually creates a low pressure area, that make suction that holds the car back. So what a Spoiler does is stick up into that airflow, which cause turbulence behind the car that eliminates that low pressure zone and the suction. It similarly interferes with the lift created by the lower pressure air over the top of the car, which results in better traction.
So a Spoiler literally Spoils the air-flow. Hence the name Spoiler.
Anybody who has watched the airplane wing from the window seat sees the spoilers pop up on the wing as soon as you touch down, spoiling the airflow and canceling the lift of the wings making sure the plane does not want to lift off again.