This long-awaited publication contains the results of the research of two distinguished professors from the University of Chicago, Alexander Beilinson and Fields Medalist Vladimir Drinfeld. Years in the making, this is a one-of-a-kind book featuring previously unpublished material. Chiral algebras form the primary algebraic structure of modern conformal field theory. Each chiral algebra lives on an algebraic curve, and in the special case where this curve is the affine line, chiral algebras invariant under translations are the same as well-known and widely used vertex algebras. The exposition of this book covers the following topics: the ``classical'' counterpart of the theory, which is an algebraic theory of non-linear differential equations and their symmetries; the local aspects of the theory of chiral algebras, including the study of some basic examples, such as the chiral algebras of differential operators; the formalism of chiral homology treating ``the space of conformal blocks'' of the conformal field theory, which is a ``quantum'' counterpart of the space of the global solutions of a differential equation. The book is intended for researchers working in algebraic geometry and its applications to mathematical physics and representation theory.