There are three types of bacteria based on how they obtain energy: heterotrophs, photosynthetic, and chemoautotrophs.