The model's output at each step is not a single token but a probability distribution over many candidates. A sampling rule then chooses one. If the rule always takes the highest-probability token, the text becomes predictable and repetitive; if it sometimes takes lower-probability tokens, the text becomes varied and surprising, and occasionally incoherent.
This trade-off is usually exposed as a single adjustable setting, often called temperature. Low temperature concentrates the choice on the most likely tokens, which suits tasks needing stable, repeatable answers such as extracting a date or following a strict format. High temperature flattens the distribution so unlikely tokens get a real chance, which suits brainstorming, naming, and creative variation. The same prompt run twice at high temperature can produce noticeably different answers; at very low temperature the runs converge on nearly the same text.