Geometry of Image Formation
Pinhole camera
The focal length is the distance from the pinhole to the image plane. The size of the projected image $(x,y)$ is related by the focal length $f$ and the distance to the pinhole $Z$.
$$x = f*\frac{X}{Z}$$
$$y = f*\frac{Y}{Z}$$
Rays captured by a lens converge on a focal plane. The distance from the lens to the image plane is twice the distance from the lens to the focal plane.