Unicellular organisms can be divided into producers and decomposers.
Producers use inorganic materials as raw materials and light energy or heat energy as energy to synthesize organic matter, which belongs to autotrophic organisms, such as photosynthetic bacteria.
The decomposer uses organic matter as food to provide energy for himself, which belongs to heterotrophs.