When you're beginning to feel sick and want to prevent the onset of the flu or cold from getting worse then you should take some flu and cold medicine that you can get over the counter.
Or have your doctor prescribe you some Tamiflu medicine that you take 48 hours before the onset of the flu.
I take Tamiflu during the flu season about 48 hours before the time I usually get the flu and then the flu doesn't get to me so I don't have to lay in bed and feel miserable.
You should also up your intake of Vitamin C and stay hydrated with plenty of water or orange juice or other juice.
Get plenty of rest as well if you do begin feeling sick as resting helps you recover from the flu much more quickly than you would if you strain yourself.
Make sure to stay hydrated, take cough and flu medicine and get plenty of vitamin c and sometimes you may get over the flu or cold more quickly or you might feel better before the sickness infects your body too much.
Once you get the cold or flu there's not much you can do to get it to go away sooner other than rest and stay hydrated.