The title basically says what I need to ask, but I have been wondering this. I currently just say a wizard comes in and cools down the drinks, but I have started to grow out of Magic and Sorcery and more into realism. Say the city is in roughly 1100-1300 AD and placed somewhat near a desert. How would a city realistically get somewhat cold drinks?
Sal ammoniac and water
Sal ammoniac is a rare crystal that is found "as encrustations formed by sublimation around volcanic vents[,] volcanic fumaroles, guano deposits and burning coal seams". Sal ammoniac was known to the Roman empire, hence well before the medieval ages.
Sal ammoniac, image by Robn Lavinsky, CC-BY-SA 3.0, source
It would be a very exclusive thing, but none-the-less possible with mundane means when deposits of sal ammoniac are available.
This would probably be combined with measures mentioned in other answers — evaporation clay pots and root cellars — to get the water somewhat cooled to begin with, which makes the ice last longer. Also if we are talking hot desert, people would probably bring out water during the night to let it cool (hot deserts can be quite chilly during the night) and then bring it inside in the morning before the sun warms everything again.
However(!)... reality check, part 1
You asked for more realism so...
Be aware that this is not a thing that medieval desert people would do, at least not for the purposes of keeping yourself cool. Drinking something cold on a hot day does not actually cool you. It feels nice, but for all practical intents and purposes you do not get any colder, and so the chilling is a wasted effort. The notion to drink something cool on a hot day is a modern thing that only came about with the invention of refrigeration in the early 1900s, and we suddenly had the luxury of having some excess cold.
In fact, it may even be more advisable to drink something hot in order to cool off. This is because if you can fool the body to think that it is overheating, the body will take steps to cool itself, the most salient such step being to open up the superficial blood vessels to dump more body heat to the skin and from there to the surrounding air.
Hence serving a cool drink in a hot desert medieval town would be more of a novelty thing; a sort of bragging where your hosts show off that they can do something very peculiar and nigh magical, namely create cold.
So if you wanted to use this to actually keep cold, you would chill water, soak a rag in it, and press this rag against an area of the body where you have a lot of superficial blood vessels — like the hands, wrists and head. This will create actual relief from heat that is much more effective than drinking, since that rag will quickly soak heat from your skin, cool the blood in the skin, and that cooler blood will then be transported back to the core of your body.
However(!!)... reality check, part 2
Also note the following:
Drinking something ice cold when your body is subjected to a lot of heat is actually dangerous.
Do not — under any circumstance — give a person that seems to be overheating cold water to drink.
Drinking something ice cold when you are warm can cause a very rapid drop in blood pressure in your head. You essentially create a temporary circulatory shock. The result is that you can faint on the spot without any warning, by simply drinking something very cold.
This happened just a couple days ago to an acquaintance of mine. We were out by the hotel pool on the Mediterranean, sunbathing and sweltering in the heat. A waiter brought drinks that were like slushies: 50% crushed ice, 50% liquid. My buddy took a big swig of his drink, said "Ooooh, dat brain freeze", and then — just like that — he keeled over, fell out of the beach chair, and hit his head on the ground earning him a black eye.
Again: the proper way to cool off if you are overheating is not to drink cold liquid but to use a cold rag on the head, wrists and hands.
So your hosts in this hot desert town would most likely tell their esteemed guests "Drink slowly and very carefully", because it does not leave a good impression to have their guests faint from being offered a drink. :)
Then again: that would make for some light comedy.
— What... why am I on the floor?!
— My dear friend, the rich merchant chuckled, that sometimes happens. I suppose I should have warned you.
— Oh... is it...
— No, no, not at all. It fades really quickly. Just sit up slowly on that chair over there.
- Difficult in a hot desert without ice/snow source (not all deserts are hot).
- Extremely expensive.
Store the drink bottle in wet sand in a porous clay container. Evaporation will help keep the drink slightly cooler than the outside temperature.
- Not very effective.
They would build a root cellar and use it to store the beverages.
A properly built root cellar will maintain a temperature above ambient (and above freezing) in the winter, and well below ambient in the summer.
Root cellars are rather simple constructions, easily achievable with medieval technology. In fact, they were a common solution to the problem of keeping crops and other goods at a reasonably stable, above-freezing temperature year-round until refrigerators (initially iceboxes, later electrical refrigerators similar to those of today) became commonplace, and in places are still used for their original purpose even today.
This has the advantage that it doesn't depend on availability of ice (which, since you say this is in a desert region, could be a problem either because of temperature or because of lack of precipitation, depending on whether they are in a hot or cold desert), but it does require some land that can be devoted to construction of the cellar. In the scenario you describe, that shouldn't be a major showstopper; most medieval "cities" would be more like what we'd call villages today.
In 400BCE, Persia had special structures that collected water in the winter, turned it into ice, and kept it cold for the entire summer:
Yakhchāl (Persian: یخچال "ice pit"; yakh meaning "ice" and chāl meaning "pit") is an ancient type of evaporative cooler. Above ground, the structure had a domed shape, but had a subterranean storage space; it was often used to store ice, but sometimes was used to store food as well. The subterranean space coupled with the thick heat-resistant construction material insulated the storage space year round. These structures were mainly built and used in Persia. Many that were built hundreds of years ago remain standing.
By 400 BCE, Persian engineers had mastered the technique of using yakhchāls to create ice in the winter and store it in the summer in the desert. In most yakhchāls, the ice is created by itself during the cold seasons of the year; the water is channeled from the qanat (Iranian aqueduct) to the yakhchāl and it freezes upon resting inside the structure.
By using a two-pot clay cooler. (expanding on what L.Dutch mentioned in their answer)
The basic premise is that when water evaporates, the medium that it leaves is cooled down.
To quote the Wikipedia article:
A pot-in-pot refrigerator, clay pot cooler1 or zeer (Arabic: زير) is an evaporative cooling refrigeration device which does not use electricity. It uses a porous outer earthenware pot, lined with wet sand, contains an inner pot (which can be glazed to prevent penetration by the liquid) within which the food is placed - the evaporation of the outer liquid draws heat from the inner pot. The device can be used to cool any substance. This simple technology requires only a flow of relatively dry air and a source of water.
Using this technique you can get your drinks pretty damn cold, ~5°C even, although this reference is from a cooler built using modern materials and not medieval ones!
I don't have a full reference, but Wikipedia mentions this type of cooling was used in Ancient Egypt, so it would stand to reason that this sort of knowledge would be prevalent by 1100-1300 AD. Evaporative cooling techniques such as this are most effective in dry climates such as a desert or mediterranean climate. In a climate with high humidity, not so much, since the amount of cooling achieved depends on the rate of evaporation.
EDIT: thanks to Falco for advice on what to include in my answer :)
They would do what we did on Earth before electric refrigeration. Harvest big blocks of ice in winter and store them in insulated ice houses for the summer. If your city doesn’t have a cold winter, they’ll have to ship the ice in from somewhere that does, in insulated wagons that travel at night.
They have various options:
- harvest snow during winter from nearby mountains and store it in underground rooms insulated with straw (it was done in my home region in the hearth of Mediterranean sea). Add salt for further cooling.
- dip them into wells, rivers or sea water (again, this was a trick used by farmers to have cold wine and fruits when working in July under the scorching sun)
- collect water from underground (either from wells or collecting rain water in underground rooms. Having had the chance to try that water I can assure you it is deliciously fresh)
- use clay containers: clay is porous, and water permeating through the walls of the container ends up evaporating and thus cooling the container itself.
If there's a river nearby, they could simply submerge the drinks in the cool water, and pull them out when they want to drink them. It might not be as cold as getting blocks of ice, or snow, but it might be a better if it doesn't get cold enough to get ice, or if it is too far to import it.
The Sahara gets sub-zero temperatures at night during the winter
So water should be able to freeze if present in the open in the winter and could then be carried into a deep cellar before dawn. Repeat throughout the winter and then store with sufficient insulation and you have ice in the summer.
That's how a fridge is created for a scouts camp:
Dig a hole in a shady location outside and put the stuff to refrigerate into it. After that you will pin a tarp over the hole and keep it wet by pouring a little water over it. Through the continuous evaporation, it gets actually really cold inside the hole, even during summer. Out of my own experience I can say that it is definitively effective enough to cool down drinks, especially for a medieval setting. Instead of a tarp, you can just take a large skin. This might be even more effective as it has a bigger surface.
In desert climates people build houses with covered (underground) trenches that travel away from the home a ways and then open to the air. Ventilation at the roof of the home draws air through the trenches where it is cooled by the earth - keeping the home cool.
Large versions of this style of dwelling will produce thick sheets of ice when water is left in these trenches overnight as convection draws the cold night air through the trenches. Example: http://www.amusingplanet.com/2013/01/ancient-ice-houses-of-iran.html
There was actually a trade in ice as late as the 19th century. For example, people in New England would cut ice out of ponds, put it in ships, and send it to the southern states. That trade even existed in North Africa, with ice being shipped by riders on relays of fast horses or camels from the Atlas Mountains to desert cities. It was a luxury item.
As noted by most others: people didn't drink cool drinks to get cool. That became only possible when industrial refrigeration became affordable (1880-1920).
Giving a guest a cooled drink was a real luxury. Akin to serving pink champagne, that kind of a luxury. Especially in a desert environment.
Ice had to be harvested during winter in cooler climates. It had to be shipped to the nearest port. Then carefully packaged transported on presumably camels or donkeys to your oasis. The local ruler would have had a specially constructed ice cellar dug deep underground where the ice was stored until it melted away. All the old great houses in Europe have one. Perhaps a few very rich rulers in an oasis had one too.
Don't know if you already found your answer but I'll give my input anyway. Here in Portugal we learned in history classes that the king used to eat ice cream and serve it to his guests during the 1800's, so in order to do it he would have ice and snow merchants, that would drive their carts to our only snowy mountain over about 200km away. In order to preserve most of the ice and snow, they would wrap it in heavy hay and straw bundles. Somehow it didn't completely melt.
You can achieve this by using the zeer or pot in pot method In some parts of India and some other countries, even now people use this method.
Also another relatively less successful is to suspend the drinks tied in cloths into a well.