Flipping a lens around by itself doesn't make it a macro lens. However, since that is the main purpose of flipping a lens, a reverse mount moves the lens farther from the camera than it would be normally, giving it the ability to focus closer. This is the same effect as extension tubes.
The reason for flipping the lens instead of just moving it farther out by using extension tubes is that both ends of the lens are not created equal. For a ideal lens, flipping it makes no difference. However, in real lenses real compromises have to be made. The back end of the lens is designed knowing that it will project the image on a flat plane close to the lens. This allows certain optimizations in the lens design. Since the front of the lens is meant to focus on more distant objects, different optimizations can be made there.
In macro mode, the focus distances to the front and back subjects are reversed. At 1:1, both are two focal lengths from the optical center of the lens. As magnification gets higher, the distance to the subject becomes smaller than the distance to the film plane. For some lenses in some cases, flipping them around in these cases can result in better optical quality.