We construct and study the Yang-Mills measure in two dimensions. According to the informal description given by the physicists, it is a probability measure on the space of connections modulo gauge transformations on a principal bundle with compact structure group. We are interested in the case where the base space of this bundle is a compact orientable surface. The construction of the measure in a discrete setting, where the base space of the fiber bundle is replaced by a graph traced on a surface, is quite well understood thanks to the work of E. Witten. In contrast, the continuum limit of this construction, which should allow to put a genuine manifold as base space, still remains problematic. This work presents a complete and unified approach of the discrete theory and of its continuum limit. We give a geometrically consistent definition of the Yang-Mills measure, under the form of a random holonomy along a wide, intrinsic and natural class of loops. This definition allows us to study combinatorial properties of the measure, like its Markovian behaviour under the surgery of surfaces, as well as properties specific to the continuous setting, for example, some of its microscopic properties. In particular, we clarify the links between the Yang-Mills measure and the white noise and show that there is a major difference between the Abelian and semi-simple theories. We prove that it is possible to construct a white noise using the measure as a starting point and vice versa in the Abelian case but we show a result of asymptotic independence in the semi-simple case which suggests that it is impossible to extract a white noise from the measure.