Organisms that make their own food are called producers (because they PRODUCE, or make, their own food). Other names for producers are autotrophs (auto = self, so they feed themselves). Producers can be plants or algae. These organisms are made of plant cells. One of the extra organelles that is found in plant cells but not animal cells is the chloroplast. A chloroplast contains a green pigment called chlorophyll. The chlorophyll captures sunlight energy in order to convert carbon dioxide and water into oxygen and glucose. Glucose is a form of sugar that producers use as their energy source. This process that occurs in the chloroplast is called photosynthesis. The hyperlink shows the chemical formula for photosynthesis.
Chemoautotrophs undergo a similar process. However, they do not use the sun as their energy source. Instead, they obtain energy by the oxidation of organic or inorganic electron donors (H2S, Sulfur, ammonia, etc) in their environments. An example of a chemoautotroph is cyanobacteria.