The common cold and flu virus typically lasts from 7 to 10 days so you should be feeling better within 10 days at the most.
If the flu or cold lasts longer than 10 days then you should see a doctor to be sure you don't have a more severe viral infection such as Pneumonia etc.
If it's just a common cold or flu then it will go away on it's own and there's not much you can do but get plenty of rest, stay hydrated, avoid caffeine, take some pain relievers and over the counter flu medicine and in 7 to 10 days the flu and/or cold virus should be gone.