Given equation is the thin lensequation 1/f=1/v+1/u, where f is the focal distance, and v and u are distances to object and image.
It is derived from general equations for refractive surfaces, the Abbe equation and the Lensmaker's equation. If an object is placed on the lens' axis, its image will be focused on some distance from the lens. The heights and the positions of the object and the image can be related by similar triangles with equal angles (in the approximation of paraxial optics).
Refer to http://www.tutorvista.com/content/physics/physics-ii/light-refraction/convex-lens-formula.php#
for the illustration of this.