Ceramic coatings create a hard glass like surface that is bonded to the deepest levels of your paint. This prevents many hazards from reaching and damaging your paint. It can even prevent light scratches as well, but the main protective nature of coatings lies more in the chemical realm. Coatings are extremely hydrophobic, which means they repel water. This prevents any form of moisture from ever reaching or contaminating your paint. Things like acid rain, chemically polluted liquids, bird droppings, brake dust, etc will never have a chance to damage or stain your paint.
Coatings are also excellent at preserving paint integrity by repelling UV rays, thus enhancing the life of your paint, preventing paint fade, breakdown, and general failure.
Ceramic coatings are not the same as paint protection film (PPF), which means they do not prevent rock chips and deep scratches.