  The study of the chemical evolution of gas and dust from pre-stellar dense
cores to circumstellar disks around young stars forms an essential part of
understanding star- and planet formation. Throughout the collapse- and
protostellar phases, simple and complex molecules are formed, many of which
deplete onto cold grains and are eventually incorporated into the icy
planetesimals of new solar systems. Tracing this chemical evolution provides a
wealth of information, not only about the chemical processing in primitive
solar nebulae, but also about physical processes which occur in the immediate
surroundings of young stellar objects (YSOs). Here we review the chemical
processes which occur in the protostellar environment, and models and
observations of the chemical structure of the various stages of star formation.
We briefly discuss the way in which molecular abundances are derived from
observations, and conclude with two examples: the low- to intermediate mass
YSOs in Serpens, and the massive YSOs in W3.
