Molecules are unique tracers of the dynamical and chemical evolution of star and planet forming regions. Thus, astrochemistry is crucial to test model predictions and to shed light on our origins. Stars and planetary systems in our Galaxy form within dense (n(H2) ~ 100,000 cm-3) and cold (T ~ 10 K) fragments of interstellar molecular clouds, called pre-stellar cores. Important chemical processes take place at this early stage, such as isotope fractionation, production of complex organic molecules and growth of thick icy mantles onto sub-micrometer sized dust grains, where water and organics are stored, and which boost dust coagulation. These processes can affect later phases of star and planet formation, which can now be traced with powerful interferometers such as ALMA and NOEMA. The chemical and physical structure of pre-stellar and protostellar cores will also be review, as well as a glance to theoretical work on prototostellar disk formation and early evolution.