A prim can be a light source by editing the prim and selecting the "Features" tab and setting the various properties for the light, such as color, radius, intensity, and fall-off.
A major change to lighting in relation to prims was made in SL 1.9.1/1.10. Previously, a prim could only be a light by setting its material to "light" and the color of the prim was also the color of the light it emitted.
Second Life's graphics engine has extensive lighting features such as the sun, moon, and objects which can all emit light. Light is also rendered differently on objects and land than on avatars.
Hardware lighting is a feature introduced in 1.10 which uses the graphics processor to handle lighting in SL. With hardware lighting enabled, the 6 closest light sources will be used (8 if counting the sun and moon).