An opportunistic infection is an infection that affects people with a less healthy immune system – if someone is ill and weaker than they would be otherwise.
A person with an immune system that is not functioning properly can get ill from a relatively non-aggressive pathogen (a micro organism that can cause mild infections). These are pathogens that would not affect a healthy person whose immune system is working normally. So these types of infections are hardly ever passed on to people who have a healthy immune system.
Examples of opportunistic infections are tuberculosis and thrush, particularly in the mouth or throat.