Even with advances in technology we still know VERY little about viruses.
The prevailing theory is that once a virus enters the body the immune system recognizes that a cell has been infected by a foreign invader; then it is tagged and eventually destroyed. The immune system supposedly remembers that strain of the virus and therefore mounts a defense sooner if that strain ever enters the body again; thus often times destroying it before you notice signs or symptoms appearing.
However that doesn't explain very well why some never contract the virus; is it just a stronger immune system, genetics, luck??
Take smallpox for example: there were many documented cases whereby same siblings slept alongside their infected siblings in same bed night after night; smallpox sibling died and yet the other siblings never contracted the disease.
Also some healthy subjects died while others had only mild symptoms and survived. (Smallpox had approximately 30% fatality rate; and 75% in some towns.) It is theorized President Lincoln likely had smallpox during his Gettysburg Address.
Same holds true for the common rhinovirus; some get sick and some do not, and others just get milder symptoms. No one really knows why.
And some do get chickenpox again later in adult life; it's known as shingles.
It has puzzled virologists for decades. So this current theory is not necessarily the correct one.
Some theorize that all viruses remain in body for life; but immune system just fights it down to the point where you are no longer contagious or show symptoms. A few have taken a step further and theorized that it gets encoded in DNA and you pass it down to your offspring, so that they get immunity or at least some immunity to that particular strain.
They are currently working on a vaccine for the most common rhinoviruses; and the research has been delivering some promising results. However, there likely will never be a time where the human race will not be constantly threatened by viruses. Its not like a scientist will likely discover a magic bullet similar to what antibiotics somewhat did with bacteria.
Actually if society ever collapses, viruses and bacteria will spread like wildfire and likely kill most of the current population in just a few short years. There are many nasty viruses and bacteria alive and flourishing out there. Bubonic Plague is just one that strikes many in the southwest United States every year. It's just you don't hear much about it because with modern medicine the Bubonic Plague doesn't kill many in the U.S. Really most only learned that the U.S. has the Bubonic Plague from when right after 9/11 the idiotic news reporters were panicking and reporting that two individuals in New York confirmed positive for Bubonic Plague. It took a while for the hysteria to clear that day, and for them to realize they really didn't have a story because dozens of people contract Bubonic Plague every year in the U.S. (thousands worldwide). But for a while it was quite a comical scene.
The human race has likely gotten weaker over the past 100 years and will not fare well without intubators and modern medicine. Hopefully that time won't occur in your lifetime; but some generation will likely go through that nightmare scenario.
Probably the wisest course of action is to limit exposure to viruses but not necessarily try to sterilize yourself from them all together. And try and maintain your immune system at moderately high levels; nutrition, stress, exercise all seem to play a defining role.