The study of chemical reactions that occur in living organisms and their interplay with the environment.