Confounding variables essentially act as another Independent Variable (the one the whole study relies on). For example, say we wanted to test the intelligence of people from differing socioeconomic areas. From Frankston we get a bunch of 12 year olds and from the Melbourne CBD we get a bunch of 20 year olds. So the socioeconomic status is intended to be the IV, however, the age acts as another independent variable which effectively ruins the study. Having a confounding variable makes it impossible to determine whether or not the DV was prompted by the IV or the CV. (In the above situation it's very blatant that age is the factor, however I wanted to get my point across. With a less extreme study we wouldn't be able to tell which one was the one causing the DV).
An extraneous variable can cause a change in the DV and affect the results of the experiment in an unwanted way, however they are generally acknowledged and counteracted prior to the study commencing, and thus they don't turn into a CV.