We propose a new epidemic model to study the coinfection dynamics of COVID-19 and bacterial pneumonia, which is the first model in the literature used to describe mathematically the interaction of these two diseases while considering two infection ways for pneumonia: community-acquired and hospital-acquired transmission. We show that the existence and local stability of equilibria depend on three different parameters, which are interpreted as the basic reproduction numbers of COVID-19, bacterial pneumonia, and bacterial population in the hospital. Numerical simulations are performed to complement our theoretical analysis, and we show that both diseases can persist if the basic reproduction number of COVID-19 is greater than one.