In machine learning, logits refer to the raw output of the last layer in a neural network before applying an activation function like softmax. They represent the unnormalized log probabilities of different classes and are used to determine the predicted class in classification tasks.