Hi,
Thank you for posting your question here, I will try to answer it to the best of my abilities.
You've asked a pretty big question, but lets see if I can summarize it properly for you. After a virus or even bacteria for that matter enter the body, they try to multiply as much as they can and as fast as they can before your immune system starts fighting them with
antibodies. It is this phase that leads to many of your symptoms and multiplication phase of the virus/bacteria is when you are infected but have no symptoms.
Now once your body starts producing specific antibodies to kill this infection, that is when the healing process starts.
Now the body keeps a memory of this infection in it, so that if you are infected again there will be a faster response time and you wont fall sick, this is what we call having immunity - this happens in the cases of infections like
chicken pox and this is the principle we follow when giving people vaccines.
Now in the case of viruses that are always mutating, like the
common cold - the body has to form new antibodies every-time since this virus is different from the last one. This is the reason why we have no cure for the common cold.
So technically once you have the antibodies, you shouldnt get infected by the same infection again, but that only works if it hasnt mutated.
Well I hope my summary makes sense and I managed to answer your question.