In a compound microscope, the final image formed is real and inverted. This happens because the objective lens, which is placed close to the object, forms a real, magnified, and inverted image of the object.
This intermediate image then acts as the object for the eyepiece lens, which further magnifies it. However, the eyepiece produces a virtual image of this intermediate image, which is usually inverted relative to the original object.
But since the objective image is already inverted, and the eyepiece does not invert it again, the overall final image remains inverted with respect to the original object.
Therefore, the compound microscope produces a real, inverted, and magnified image.