A wing is any type of rear add-on, whether functional or not, factory or not, which is mounted usually with 2 pedistals, where air can flow over it and under it. A spoiler is a single blade.
They function differently to achieve a similar goal.
Typical NASCAR uses a spoiler. It's a simple flat plane placed on the rearmost edge, with an upward angle, to get the air that hits it to push the rear of the car to the ground. This creates a high amount of drag to create a little downforce.
The Subaru WRX STi and Lancer Evolution have wings. The blade (horizontal part that affects airflow) is shaped like a wing to take advantage of Bernoulli's principle. Basically, what Bernoulli's principle says, for a physics refresher, is that fluid moving at higher rates of speed create less pressure than fluids moving at slower speeds, and if you have to move an equal amount of air around each side, you can make the distance longer on one side to impart a force. In the case of an airplane, a wing has the longer side of the air foil on top, to create low pressure on top of the wing and high pressure underneath it, which gives the plane enough lift above certain speeds to fly. On a car, you can use a wing the exact same way for the opposite effect. Flip the wing over so that the longer section is on the bottom, then you create a low pressure section on the bottom side of the wing, and a high pressure area on top. This will create downforce on the rear of the car, pushing the rear of the car into the ground. This is more complicated, but ultimately more effective as a wing creates less drag than a spoiler. Basically, all things being equal, if you put a spoiler and a wing on 2 identical cars, set for the same amount of downforce, the wing would have less drag, which results in quicker acceleration and a higher eventual top speed, however minor these numbers might be (as little as .2mph, or as much as 10mph, depending on how aggressive the wing/spoiler are.).