Carbon fiber composites are made up of sheets of carbon fiber filaments. These are usually impregnated with resin. To make CF structures, manufacturers will cut up the sheets, then lay them up onto a mandrel or other structure. They will then bake them at high pressure and temperature to cure the resin. The image below is from a Youtube video showing how Mad Fiber wheels are made - that company is now defunct, this is just for illustrative purposes.
If you have a CF frame or component and it's been damaged such that you can see torn fibers, it needs repair or replacement. This is obvious but probably worth stating. The image below is from Appleman Bicycles, who is a carbon framebuilder and repairer in my city. Disclosure, he's local to me and we are acquaintances, but I'm not a customer. On the left side of the frame, the fibers are clearly broken. It may not be as obvious on the right side, but I'm pretty sure that if you saw that frame in person, you'd see broken fibers also.
With that trivial question out of the way, it is frequently hard to know what to do if you crash on a carbon frame or component and there's no obvious damage. Damage to carbon items is frequently not visible at the surface. However, an impact, even a fairly soft one, might lead to a delamination below the surface that later grows into a larger failure. Delamination is the CF term of art for a fracture.
Ultrasound or other imaging is used to inspect CF parts in the aerospace industry. Ideally, we would have this capability widely available, but we do not. This is the only reliable way to detect a delamination under the surface. There may be a carbon repair shop close to you with this capability, but your local bike store cannot do this. Many people will propose a tap test, where you tap a coin lightly around the suspected fracture and listen for a change in pitch. The problem is that this test is most reliable on flat surfaces, and bikes don't really have a lot of those.
What to do: a proposed set of steps for consumers
This section concerns what to do if you sustain an impact that doesn't leave visible damage. For major impacts like a car vs. bike accident or a crash at racing speeds, more caution is recommended. It also depends on what part is involved; if your handlebars are damaged and they break, that will almost surely cause a crash, although if you are extremely skilled you may be able to recover (but you shouldn't count on being able to do this). I think the same would hold for stems and forks. I would lean towards replacing these parts immediately if you take a major impact. Minor impacts can be handled through watchful waiting, but some level of caution and regular inspection is still recommended.
I'm less certain about frames. In many cases, they are shielded from direct hits by the other parts of the bicycle and by your body. Again, the ideal case would involve an ultrasound or equivalent inspection after a crash. In the absence of that, I would propose watchful waiting. Be familiar with how your bike sounds and how it flexes under your pedaling. If you notice a sudden change, stop riding and try to see if there are any cracks. The picture below is from a video by Raoul Luescher, a carbon bike repairer based in Australia. Here, a metal part associated with the steering system hit the bike's head tube from inside due to arguably poor design. There was a small visible crack from the outside.
I believe that paint chips around frequently handled parts can be ignored. These might include areas around the dropouts. Gravel bikes may frequently take paint chips from flying bits of gravel. Some examples of what I believe to be paint chips are below, taken from recent posts.
Last, consumers should be aware that damaged carbon frames can be repaired. These repairs are not that expensive compared to repairing metal frames. On metal frames, damage will frequently involve replacing the entire affected tube. In contrast, with carbon, the second photo from Appleman bicycles shows that repairs can be localized to just the damaged area. I believe that forks, wheels, stems, and handlebars are not cost effective to repair; you should just replace those if damaged.