The synthesis of nuclei in diverse cosmic scenarios is reviewed, with a summary of the basic concepts involved before a discussion of the current status in each case is made. We review the physics of the early universe, the proton to neutron ratio influence in the observed helium abundance, reaction networks, the formation of elements up to beryllium, the inhomogeneous Big Bang model, and the Big Bang nucleosynthesis constraints on cosmological models. Attention is paid to element production in stars, together with the details of the pp chain, the pp reaction, 3 He formation and destruction, electron capture on 7 Be, the importance of 8 B formation and its relation to solar neutrinos, and neutrino oscillations. Nucleosynthesis in massive stars is also reviewed, with focus on the CNO cycle and its hot companion cycle, the rp-process, triple-α capture, and red giants and AGB stars. The stellar burning of carbon, neon, oxygen, and silicon is presented in a separate section, as well as the slow and rapid nucleon capture processes and the importance of medium modifications due to electrons also for pycnonuclear reactions. The nucleosynthesis in cataclysmic events such as in novae, X-ray bursters and in core-collapse supernovae, the role of neutrinos, and the supernova radioactivity and light-curve is further discussed, as well as the structure of neutron stars and its equation of state. A brief review of the element composition found in cosmic rays is made in the end.