Galaxies, along with their underlying dark matter halos, constitute the building blocks of structure in the Universe. Of all fundamental forces, gravity is the dominant one that drives the evolution of structures from small density seeds at early times to the galaxies we see today. The interactions among myriads of stars, or dark matter particles, in a gravitating structure produce a system with fascinating connotations to thermodynamics, with some analogies and some fundamental differences. Ignacio Ferreras presents a concise introduction to extragalactic astrophysics, with emphasis on stellar dynamics, and the growth of density fluctuations in an expanding Universe. Additional chapters are devoted to smaller systems (stellar clusters) ...