We're not really sure where the word "mulled," as in mulled wine (or cider) comes from. The first extant use of it in the context of wine or cider heated with spices and sweetening is from 1607, in G. Wilkins Miseries Inforst Marriage "I can drinke Muscadine and Egges, and Muld-sack." (OED mulled). But we do know that slightly sweetened wine, heated with spices and fruit, goes back to the middle ages.
Back then, mulled wine was called Ypocras, or Hippocras (after Hippocrates, the legendary physician). It was considered a seasonal tonic, stored after making for a month or so, then heated again and served.
In Scandinavia, the beverage is called Glögg, or Gløgg to the Danish, Glögi to the Finns. Spices, primarily cinnamon, cloves, and sometimes, cardamom, are added to a red wine base that's been slightly sweetened with sugar. Sometimes brandy, akavit or vodka are added at the last. It's not meant to be boiled because the alcohol content is considered a main feature. Glögg is served in generously sized mugs, sometimes expressly made for the purpose, and accompanied with almonds, raisins, and warm gingerbread. Swedes also often serve Glögg, with ginger bread and sometimes, with lussebullar, a sweet saffron-flavored raisin bun, and has close ties with Christmas. The Norwegians serve Glögg before a traditional rice pudding.
In Germany, Glöhwein is made by heating slightly sweetened red wine with cinnamon and lemon rinds, without letting it boil, until the cinnamon has suffused the wine. An additional shot of schnapps or brandy just before serving is optional. Glöhwein is traditionally sold along with hand-crafted gifts in the open-air Christmas markets in November and December.
For more modern American-style mulled wine, the basic method consists of finding a palatable but affordable red wine; usually a dry red is used, often a burgundy, but there's nothing wrong with using a Merlot, a Shiraz, or a Cabernet sauvignon, or even a Zinfandel. And there's a good German tradition that calls for a white wine to be mulled, so consider a Riesling or a Viognier too. Don't use an expensive wine for mulling, but don't use something you wouldn't happily put in a glass and drink, either.
You want to use a non-reactive pot to simmer (but not boil) the wine; a crock pot is a lovely way to prepare, and serve, mulled wine since the wine is kept at an even temperature, allowing you and your guests to socialize and come back for seconds, without requiring a cook to stand over a pot.
Zest a half a lemon or orange, and add the juice and zest to the wine. Add between an eighth and and half cup of sugar, to taste, two or three sticks of cinnamon, two or three whole cloves, and, depending on preferences, a crushed Cardamom pod, or a star anise or two, or one or two slightly crushed black peppercorns. Let them simmer without boiling for a least a half hour, stirring every few minutes, and adjust the sugar and spices to taste.
Depending on preferences, you might want to add a splash of brandy to each mug before serving, or as much as a half cup to the mulled wine mixture. Other possibilities include a vanilla bean, but I'd make and use vanilla sugar, instead. You might find a small square of cotton or cheesecloth with the zest and spices tied up in it makes a less cloudy beverage, and easier clean up. Many people prefer to use thinly sliced rounds of lemon and orange, keeping rind and fruit but removing seeds is better option than juice and zest, and makes a very pretty presentation, especially when served with an additional cinnamon stick as a stirrer.
Here are some recipes though for several different versions, including one from an English Victorian cookbook (scroll down or search the page for the word "mull").