Microbes vary in their response to disinfectants because these chemicals attack specific targets in the cell which a given microbe might not have. In addition, certain bacteria have enzymes which are capable of removing toxins from inside their membranes, making them resistant to disinfectants and antibiotics.
Alcohol is thought to attack cell membranes and denature cell proteins, according to the U.S. National Library of Medicine. This causes issues with metabolism and the cell normally lyses soon after exposure. This method works well with bacteria, which have exposed membranes, but has a reversible effect on spores. Isopropyl alcohol is better suited for attacking bacteria, due to its lipophilic properties, while ethyl alcohol is more effective against hydrophilic viruses. Aldehydes are effective against almost all microbes, as these chemicals attach to the cell wall and membrane and inhibit enzyme systems.
Chlorhexidine is effective in killing most bacteria but is ineffective against spore and viruses. This is due to the chemical's mechanism: it attacks the lipid layers of the cell membrane, which is not readily exposed in viruses or spores. The effectiveness of a disinfectant also depends on the presence of efflux pumps in a microbe. Even if the disinfectant effectively targets a weakness of a given microbe, at low enough concentrations a microbe may be able to pump the toxin out of the cell and survive. Constant exposure to low levels of a disinfectant results in resistant strains.