Infected computer

I would like to protect another computer , but I am concerned about the infections that might already be in it !  Can I just install my new NIS on it and be fine ??  Thanks