An ear infection is not solely bacterial; viruses and fungi can also be the cause. However, bacteria cause the most common ear infections, like Streptococcus pneumoniae and Haemophilus influenza, which cause middle ear infections.