Several decades after the discovery of general relativity, it was realized that it cannot be the complete theory of gravity because it is incompatible with quantum mechanics. Later it was understood that it is possible to describe gravity in the framework of quantum field theory like the other fundamental forces. In this framework, the attractive force of gravity arises due to exchange of virtual gravitons, in the same way as the electromagnetic force arises from exchange of virtual photons. This reproduces general relativity in the classical limit, but only at the linearized level and postulating that the conditions for the applicability of Ehrenfest theorem holds, which is not always the case. Moreover, this approach fails at short distances of the order of the Planck length.