Quantum phase transitions occur at zero temperature and involve the appearance of long-range correlations. These correlations are not due to thermal fluctuations but to the intricate structure of a strongly entangled ground state of the system. We present a microscopic computation of the scaling properties of the ground-state entanglement in several 1D spin chain models both near and at the quantum critical regimes. We quantify entanglement by using the entropy of the ground state when the system is traced down to \(L\) spins. This entropy is seen to scale logarithmically with \(L\), with a coefficient that corresponds to the central charge associated to the conformal theory that describes the universal properties of the quantum phase transition. Thus we show that entanglement, a key concept of quantum information science, obeys universal scaling laws as dictated by the representations of the conformal group and its classification motivated by string theory. This connection unveils a monotonicity law for ground-state entanglement along the renormalization group flow. We also identify a majorization rule possibly associated to conformal invariance and apply the present results to interpret the breakdown of density matrix renormalization group techniques near a critical point.