In drawings and diagrams, it seems like those cities were at most a few square kilometers. In Assassin's Creed, a supposedly historically accurate game, they're also about the same size. But the idea of cities that only house a few thousand people sounds strange, given that by the Black Death time, there were like 30 or 40 million people in Europe. So what were cities like back then?
The thing is, the vast majority of people would have lived in the countryside, either on farms, manors, or small hamlets of just a few families. Even in densely populated and urbanized areas in medieval Europe like Italy, my own region of expertise, when I say "Italy was urbanized" what I really mean is that there were innumerable small towns and villages; not that most people lived in large cities.
Further, 30 or 40 million people aren't all that many for a place as big as Europe. A population of 30 or 40 is less than the whole of modern Spain, and much less than modern France, Germany, Italy, or Great Britain.
It's also true that medieval cities were much denser than modern cities, which mean that more people could fit in less land area. Modern apartments typically have rooms set aside for living, cooking, and hygiene, and construction is limited by zoning limitations, things ventilation requirements, and countless other restrictions; while no such regulations were in place in the past, allowing for much smaller housing units (plus, we're talking about a time without indoor plumbing anyway). You might think the vast palaces of the aristocracy would bring down the overall population density, but keep in mind that these would be staffed by numerous servants. Typical housing for a shopkeeper or artisan would also be dense, often consisting of the rooms above the workshop which they might even share with a large extended family. Lastly, because when not working for their keep, public life in the town square and religious holidays occupied the time of ordinary people; people would spend much less time indoors, or at the very least within the confines of their home.
I wrote about urban density in Renaissance Florence in this answer from a couple of years ago which you might be interested in. There, I point out that Florence's 40,000 inhabitants were crammed in 1.66 square miles (430 hectares) putting density at little over 24,000 per square mile. I also wrote about urban expansion in medieval walled cities here.