  This paper will review the basic concepts of gas-phase and grain surface
chemistry of dense molecular clouds, where low mass and high mass stars form.
The chemistry of cold pre-stellar cloud cores, where molecular freeze-out and
deuterium fractionation dominate, will be presented. Then, following cloud
evolution after protostellar birth, hot core and shock chemistry will be
discussed in view of recent observations. A brief summary of the chemistry in
protoplanetary disks will also be furnished. The aim is to identify important
gas tracers in the various steps of the star formation process, pointing out
the main problems still open in the field of astrochemistry.
