When cells are infected by a virus, they produce small amounts of proteins called interferons.
These proteins increase the resistance of neighboring cells to infection by the same or other viruses.
They seem to do this by inhibiting viral reproduction.