An extraneous variable is any variable that may have an unwanted effect on the DV. These can be identified prior to the experiment beginning and thus eliminated. For example, if you were doing a study on the effect of age on intelligence, having 50 females but only 6 males would constitute an extraneous variable, as sex can have an unwanted effect. Therefore, you would use an appropriate sampling technique to ensure the effect of sex is balanced or eliminated.
A confounding variable is a variable that has HAD an unwanted effect. The study has been done and it has effected it - it cannot be removed now. You will not be able to tell if it is the IV (e.g. age) or the confounding variable (eg sex) which had the effect! For example, if your experiment did have 50 females and only 6 males, then by the culmination of the experiment, sex would be considered a confounding variable.
Hope this helps