They are using the invaded area as their host, moving in and becoming guests. As guests, they are using the environment to house and feed themselves. The immune system was too weak at the time to refuse them entry, or it might have confused them with an organism that it thought was friendly. As the virus begins to die, having gone through its life cycle, the bacteria then start a secondary infection. When a cold or flu sufferer goes to his MD and receives an antibiotic, the doctor is prescribing it to kill the secondary bacterial infection.
Antibiotics have no effect on viruses.
Once the virus gets in and causes an infection, it can be there for 10-14 days. If the immune system is very weak, the infection could be there for months. I have seen cases where colds or flues lasted several months having both viral and bacterial activity. An indicator of viral activity is the mucousy discharge from the body will usually be clear. An indicator of a bacterial infection is that it becomes more yellow or greenish.