Very simply, focal-length is the distance from the lens to the film, when focused on a subject at infinity. In other words, focal length equals image distance for a far subject. To focus on something closer than infinity, the lens is moved farther away from the film or sensor. This is why most lenses get longer when you turn the focusing ring.