Softmax turns a list of raw scores (logits) into a probability distribution: every value becomes positive and they all sum to one. It exponentiates each score and divides by the total, so larger scores get disproportionately larger probabilities.
It appears twice in a language model: inside attention (converting match scores into weights) and at the output (converting logits into next-token probabilities). Dividing the logits by temperature before softmax is how sampling is tuned.