>>3775813M = f /(f - s) where s is the distance to the object.
So a focal length of 50mm with an object 100mm from the lens results in an M of -1, which is simply a real upside down image.
place the object further away (s increases) and the denominator becomes increasingly negative. The resulting M stays negative but becomes smaller and smaller (so the resulting image becomes is magnified by that factor and becomes smaller)
Place the object nearer and the opposite happens, up until s = f, at which point the numerator would become 0, which is undefined. once s<f then the denominator becomes positive. A positive M results in a virtual image, this starts of large and becomes smaller as the object comes nearer, finally once s = 0 the virtual object is the same size as the actual object.
This is assuming an ideal single converging lens.