The deepest feature maps are a compact description of the image in terms of learned concepts. Flattening them into a vector and passing that through one or two fully connected layers produces one raw score per class. A softmax then exponentiates each score and divides by the total, turning the scores into values between zero and one that sum to one. The largest is the predicted class; its value is the confidence.
What confidence does and does not mean
Confidence is the model's internal preference among the classes it was given, not a guarantee of correctness. A model that has learned the wrong thing can assign a high score to the wrong class. Reading 0.92 as "92 percent likely to be correct" is a common and costly mistake.
The engine now answers what is in the image. It does not answer where anything is. Locating and outlining objects requires a different output structure, which is the next problem.