A specular map defines how shiny a surface is by controlling how specular highlights are applied. For instance, let’s say you have an old, dinged up bowling ball that hasn’t been polished in ages; you wouldn’t want it to be uniformly shiny across the entire surface. Instead, you’d use a spec map to define where it’s matte and where it’s still nice and smooth.
Ambient occlusion (AO) is a shading technique that tries to simulate the way that ambient light (like light from an overcast sky for instance) affects an object. Most of the surface will be uniformly lit, but pits, divots, cracks and crevices will be occluded, resulting in shadows that seem to cling to them. Rendering AO can be somewhat processor intensive, but if your shape isn’t dynamic, you can instead bake the result to a greyscale AO map, and apply it as a texture.
The first pic is a somewhat extreme example, just to illustrate what AO does. Notice how the object on the right is bright on its outward faces, but the parts that are indented are darker? That’s precisely what AO does.
The second image is the baked AO map, which could be applied as a texture to achieve the same effect but without as much processing overhead.
The final image shows a more subtle usage of AO, to help illustrate how the effect might be used.