Exercising or sweating when you have a cold can help you feel better and relieve the symptoms of the cold at least temporarily.
However there's no possible way to actually sweat out the cold but I do find that when I start sweating when I have a cold it makes me feel better for at least a little while.
There is no cure as of now for the cold and all you can really do is stay hydrated, get plenty of rest and take some over the counter cold medication and within a 7 to 10 days you should be feeling much better and the cold should be gone.