In order to survive, prokaryotes such as bacteria need to produce energy from food such as glucose. In eukaryotic cells, respiration is performed by mitochondria, but prokaryotic cells do not have membrane-enclosed organelles. How do prokaryotic cells respirate without mitochondria?
Mitochondria are very similar to bacteria and are thought to have originated from bacteria. This points you to the answer: bacteria produce ATPs the same way mitochondria do, with the oxidation machinery place in their plasma membrane (analogous to the mitochondrial membrane).
An electrochemical gradient is needed to carry out cellular respiration. Compartimentalization is necessary for gradients to exist. Both mitochondria and certain bacteria possess a double membrane, between which a gradient can be kept. Essentially, they are acid-containing bags which in turn enclose cytoplasm-containing bags. Mitochondria can be thought of as bacteria living in permanent symbiosis with their eukaryotic hosts. Conversely, those bacteria can be thought of as their own mitochondria.