Crema is a thin layer of foam that sits on top of an espresso. Crema is formed from carbon dioxide that is left over after coffee beans are roasted. Fresh espresso appears to be mostly crema during brewing and separates itself after pouring.
Crema is a result of the CO2 producing bubbles when the coffee beans and water combine. The bubbles are infused with melanoidin, a chemical in the coffee beans, to produce foam. Crema should be a reddish-brown color, and over-extraction causes crema to darken. Crema that appears separate during the brewing process typically indicates stale coffee, and the crema generally disappears after pouring.