The notion of a conformal algebra encodes an axiomatic description of the o
perator product expansion of chiral fields in conformal field theory. On th
e other hand, it is an adequate tool for the study of infinite-dimensional
Lie algebras satisfying the locality property. The main examples of such Li
e algebras are those "based" on the punctured complex plane, such as the Vi
rasoro algebra and loop Lie algebras. In the present paper we develop a coh
omology theory of conformal algebras with coefficients in an arbitrary modu
le. It possesses standards properties of cohomology theories; for example,
it describes extensions and deformations. We offer explicit computations fo
r the most important examples.