The four-momentum of any real particle satisifies the relationship $p_\mu p^\mu = -m^2$. This defines a 3-D surface in the 4-D space of all possible four-momenta; this surface is called the mass shell for the particle. A virtual particle, on the other hand, can have any four-momentum vector that you want; a virtual particle is usually "off-shell", because its four-momentum doesn't lie on the mass shell.
However, virtual particles still obey energy and momentum conservation: the four-momentum going into any vertex in a Feynman diagram must equation the four-momentum going out. It is entirely possible for a real electron to emit a virtual photon and remain on its own mass shell; this is exactly what happens in the classic Feynman diagram with two "real" electrons exchanging a virtual photon. The only reason that conservation laws prohibit a "real" electron from emitting a "real" photon is that it is impossible for all three four-momenta (electron before, electron after, and photon) to simultaneously lie on their respective mass shells.