An Ambient Occlusion or AO map is a grayscale map which contains lighting data. It is not typically used as its own map, and is instead usually combined with the diffuse map to bake in soft shadows.
In 3D engines(both real time and otherwise) most lighting and shadow information in the final displayed image output is taken from the lights used in the scene.
This is usually done in one of two ways:
The 2nd situation above is useful for real time engines running on older hardware, or lower spec devices like mobile phones.
An ambient occlusion map is similar to a lightmap, but shouldn’t be confused with one.
AO Maps are much more subtle than a lighting map and are actually used as well as lighting information at render time, not instead of.
The way its output works technically does not cast shadows like a lightmap would. It just calculates areas of the mesh that are facing away from the light source and darkens them, without taking any further meshes into account.
This gives an illusion of self-shadowing but will not cast a shadow of one object onto another.
AO maps tend to only have subtle shadows and highlights, which are then usually overlaid on other maps (usually diffuse, but some people combine it with their metalness or specular maps instead). This is done in 2D software such as Photoshop.
The end result is that when your model is unlit it will still have some simple light information stored on it like it was in an ambiently lit environment (hence the name, ambient occlusion).
Once this is combined with your other lighting it helps strengthen your shadow detail and makes a lot of the finer details of your models pop!
AO maps are a very commonly used tool in modern 3D applications, with almost all of them having some built-in functionality that allows you to bake these maps.
Some software like Substance Painter allows you to paint directly onto your AO maps, thereby giving you more artistic freedom with their output.
Either way, these are a very useful addition to any high quality render. And I do recommend looking into the best ways to implement them into your workflow.