This textbook presents an exposition of stochastic dynamics and irreversibility. It comprises the principles of probability theory and the stochastic dynamics in continuous spaces, described by Langevin and Fokker-Planck equations, and in discrete spaces, described by Markov chains and master equations. Special concern is given to the study of irreversibility, both in systems that evolve to equilibrium and in nonequilibrium stationary states. Attention is also given to the study of models displaying phase transitions and critical phenomena both in thermodynamic equilibrium and out of equilibrium.These models include the linear Glauber model, the Glauber-Ising model, lattice models with absorbing states such as the contact process and those used in population dynamic and spreading of epidemic, probabilistic cellular automata, reaction-diffusion processes, random sequential adsorption and dynamic percolation. A stochastic approach to chemical reaction is also presented.The textbook is intended for students of physics and chemistry and for those interested in stochastic dynamics.It provides, by means of examples and problems, a comprehensive and detailed explanation of the theory and its applications.