WhatA token is picked from the list by a weighted roll: likely tokens come up often, unlikely ones sometimes.
HowTemperature sharpens or flattens the list. Top-k keeps the k most likely tokens. Top-p keeps the smallest top set that adds up to p.
Why it mattersThat is why the same text can get different answers. Temperature 0 always takes the top token.