Except for 1H, 2H, 3He, 4He, and 7Li, originating from the Big Bang, all heavier elements are made in stellar evolution and stellar explosions. Nuclear physics, and in many cases nuclear structure far from stability, enters in a crucial way. Therefore, we examine in this review the role of nuclear physics in astrophysics in general and in particular how it affects stellar events and the resulting nucleosynthesis. Stellar modeling addresses four major aspects: 1. energy generation and nucleosynthesis, 2. energy transport via conduction, radiation or possibly convection, 3. hydrodynamics/hydrostatics, and finally 4. thermodynamic properties of the matter involved. Nuclear Physics enters via nuclear reaction cross sections and nuclear structure (affecting the composition changes and nuclear energy generation), neutrino-nucleon and neutrino-nucleus cross sections (affecting neutrino opacities and transport), and e.g. the equation of state at and beyond nuclear densities which creates a relation between the nuclear many body problem and and hydrodynamic response like pressure and entropy. In the following we review these four topics by highlighting the role and impact of nuclear physics in each of these aspects of stellar modeling. The main emphasis is put on the connection to element synthesis.