This is a brief review of the progress made since the seminal contributions to the foundations of the theory of nucleosynthesis by M. Burbidge, G. Burbidge, Fowler and Hoyle, and by Cameron. The reviewed topics are (1) the nuclear physics input to the nucleosynthesis models (nuclear masses, fission, rates of β-decays, neutrino reactions, photoreactions, and nuclear charged particle-induced or neutron-induced reactions), (2) the nuclear physics and astrophysics aspects of the r-process, and (3) the same items for the p-process.