Plants, bacteria and animals have to very different methods of obtaining nutrients. Plants and some bacteria can create their own food, this makes them Autotrophs. Animals however cant synthesises their own food and must obtain it from the environment (Heterotrophs).
Autotrophs are able synthesise organic molecules from inorganic molecules found in the environment. That is they Produce their own food. This is why you will often refer to plants as producers in an ecosystem.
Plants will undergo photosynthesis (click here for more information) to generate their food. This is a method where plants will use the sunlight to synthesis glucose molecules, using water and carbon dioxide.
So how do deep see bacteria get their energy? Well, some bacteria undergo a process called Chemosynthesis (click here for more info)
Unlike Autotrophs, Heterotrophs do not synthesise their own food. Heterotrophs get their food from the environment. They consume other organisms in order to gain nutrients.
Click here for more information on the different types of nutrients your body needs