This book is a systematic study of the classical and quantum theories of gauge systems. It starts with Dirac's analysis showing that gauge theories are constrained Hamiltonian systems. The classical foundations of BRST theory are then laid out with a review of the necessary concepts from homological algebra. Reducible gauge systems are discussed, and the relationship between BRST cohomology and gauge invariance is carefully explained. The authors then proceed to the canonical quantization of gauge systems, first without ghosts (reduced phase space quantization, Dirac method) and second in the BRST context (quantum BRST cohomology). The path integral is discussed next. The analysis covers indefinite metric systems, operator insertions, and Ward identities. The antifield formalism is also studied and its equivalence with canonical methods is derived. The examples of electromagnetism and abelian 2-form gauge fields are treated in detail. The book gives a general and unified treatment of the subject in a self-contained manner. Exercises are provided at the end of each chapter, and pedagogical examples are covered in the text.