Cookies get around a major limitation of the World Wide Web and web browsing: each time a web page is loaded, the web site forgets everything that came before and starts from scratch. For instance, if a web site developer wants to keep track of the number of times you've visited, they can store your visit count in a cookie. Without the cookie, the count would be lost and every visit would be counted as your first.
A web site's cookies may contain just about anything. They are commonly used to remember your username on sites that require login.
The Thousand-Sided Dice uses a cookie to keep track of your 'session' identifier, which is a big long number called PHPSESSID. The session identifier allows the site to remember your session data, which includes stuff like the current prefix and suffix, and the 'naughty fragment' setting. If cookies are disabled, this web site resorts to passing the session ID in the URL. Go back to the main page and watch the address bar as you use the dice. If your browser has cookies disabled, you should see something that looks like 'PHPSESSID=reallylongstringofstuff'. Ugly, isn't it? You can get rid of that by enabling cookies.