One of the biggest excuses I hear as a personal trainer is "I can't work out because I'm sick". Good. You shouldn't. When your body is ill, it doesn't need to be repairing the muscle you pulled apart, it needs to rest and get better. So if you wake up and feel like death, or as the day goes on you start to sport a runny nose, a sore throat, and possibly a fever and headache, you need to go to bed and sleep it off instead of the gym with some ridiculous idea you can sweat it out. The only thing you will achieve by going to the gym when you are ill is spreading your germs.
A gym is already a germ factory; multiple people and children coming in and out, leaving sweat and sharing breathing space. A sneeze can travel faster than 40mph, a cough can spread its germs in a 25 foot radius, and a fever usually means your contagious. Plus, who wants to work out when you feel like that anyways? You would be surprised. You are not going to sweat out a fever; you have a fever because your body has amped up your internal temperature to kill the bad bacteria causing you to feel ill in the first place. You don't really want to force your internal body heat up any higher by running. You should however, feed and hydrate a fever. Make sure you are getting plenty of fluids- water and gatorade or even pedialite to replenish electrolytes. Eating chicken soup or scrambled eggs is easy on your stomach, but gives your body the fuel it needs to keep fighting the good fight. Starving your body will only weaken it more.
Rest will never make a cold or flu worse. So get as much of it as you can. It allows your body to focus 100% on recharging and winning the war at hand. Exercise is a stress on your body. While it's a good stress most of the time, it is still considered a stress. If your body has to try and fight the flu and provide the power to lift weights, it's going to prioritize the weights to prevent you from dropping them on your face. A cold or flu makes your body feel broken down for a reason- listen to it!
It's not recommended you come back to the gym until you feel at least 80% better or have been on antibiotics for over 24 hours. If you are that pressed on getting a workout in, walk your block or do pushups in your own house. Fair warning though: it's easy to get discouraged with a workout while you're sick because your body doesn't want to hold you up, let alone an extra 20 pounds bar for squats. You're risking losing form and injuries now too. Why aren't you just in bed yet?!
Part of being healthy means caring for yourself when you are sick, even if it means you need to miss a few days of beast mode workouts. You will bounce back, and you will bounce back quicker if you give your body the time it needs to recover 100%.
On a side note, people who exercise regularly get sick less often because exercise helps boost your immune system, help you sleep better, and make better nutritional choices. It doesn't make you superman (or Wonder Woman) though, so if you do catch the bug, hit the bed.