I assume you want the standard Phong or Blinn-Phong lighting model, which the fixed-function GL uses, too.
The emissive term is the color the material emits by itself (for example when modeling a light). So it just adds to the final color.
color = emissive;
The ambient term simulates the indirect lighting computation due to infinitely reflected light, so it doesn't depend on the position of the light and is approximately everywhere. So the material's ambient is just multiplied by the light's color and adds to the final color.
color += ambient * lightColor;
The diffuse term simulates a standard Lambertian reflector, that reflects light equally in all directions. It depends on the angle between the direction to the light and the surface normal, with smaller angles resulting in more light.
lightDir = normalize(lightPos-facePos);
color += dot(lightDir, normal) * diffuse * lightColor;
The specular term finally simulates specular surfaces, that reflect more light into a singular direction (the perfect reflection direction). So it depends on the direction you are looking onto the face in. Additionally the reflectivity depends on another parameter that describes the roughness of the surface (or actually its shininess which is also the name GL uses, with higher values making sharper highlights and thus being more "shiny").
viewDir = normalize(cameraPos-facePos);
halfVec = normalize(lightDir+viewDir);
color += pow(dot(normal, halfVec), shininess) * specular * lightColor;
Of course the ambient, diffuse and specular term have to be computed for every light.
For more complex lights other than simple point lights without distance attenuation, you have to consider other things, but this simple model should get you started.