There are 3 main types of lights:
Point and Spot lights radiate a sphere of light in all directions, or a cone of light in a specified direction. These lights are placed in the scene at (what we hope is) the most advantageous position. How these lights affect a surface is dependent on the angle between the rays from the light and the surface normal for any given triangle. If the surface normal and the light ray are pointing directly at one another, that triangle then receives the full effect of the light's color and intensity. But as the surface bends away from the light, or the light ray points away from the surface, that effect fades. The light shader may also be written such that the light will fade off, the further away the light is from the surface. This is called attenuation.
Infinite lights represent lights so distant that all their rays appear to run parallel, such as sunlight. These lights do not need a specific location, but must be given a direction for the rays. Their contribution to the surface lighting is dependent on the angle between that direction and the surface normal for any given triangle. If attenuation is applied to a distant light, then that light must also be given a location.
The rendered image looks like:
Below is an example of the ShadeTree spotlight using a texture map for projection. This the light_texspot.stree from the examples directory. In order to align the image with the light, a projection vector is subtracted from the surface point, P. Then the resultant vector is normalized, the xy coordinates of the vector are used for the u and v locators into the map.
The rendered image looks like:
This is not a technically correct projection, but it looks cool. There is an actual projector light shader, built-in under Shaders->Light.