How do machine learning algorithms handle classification labels? I am working on a domain adaptation problem, where the default is a classification problem. I have worked exclusively with regression problems until now, so I am kind of thrown for a loop when it comes to understanding how ML algorithms handle the labels in classification problems. In regression, we use MSE loss with the output from our CNN and compare with the numeric label, how does this work in classification problems? The model outputs an array of numbers, so how cross entropy, and its variants, compare this array with a string label such as 'car', or 'unhealthy'. Is there a specific call to add to my CNN output to make this make sense?
For reference, i am trying to classify images into 3 categories.

All machine learning models need the data provided as numbers because what they do is build mathematical models. This means that you need somehow to encode all the non-numerical data (images, words, categories, sound recordings, etc) to numbers, this applies both to the features and the labels. To learn more, search for feature engineering. In the case of labels, we encode them as binary variables (binary, -1/+1), whereas for multiple categories we can use something like one-hot-encoding.
As for training the model, it's the same as regression: the model predicts some score and it is compared to the encoded label using a loss function. Squared error is a perfectly fine loss here, but there are also specialized ones like cross-entropy loss.
If this is new to you, I'd recommend that you start with some introductory course or handbook on machine learning to catch up.
