CAP is an infection of the lungs acquired outside of healthcare facilities. It is primarily caused by bacteria, viruses, or fungi inhaled from the environment. The most common bacterial cause is Streptococcus pneumoniae, but other pathogens like Haemophilus influenzae, and Mycoplasma pneumoniae are also significant contributors.