Some people may answer this question by saying that the medieval cities had severe hygiene problems and were flooded with rats. First of all, archeologists haven’t found that many remains of rats. But, there are other reasons that I’ll get to in a minute.
The Black Death spread quickly within a city or region. It spread slowly, by our standards, as it traveled down the Silk Road from China to Northern Europe. (This last process took at least a year.)
So why did it spread quickly in a city?
Number one reason was the appalling physical condition or health of most city dwellers due to insufficient food and poverty. Many people born around the Great Famine, 33 years earlier, never got enough food in childhood and had stunted growth, poor muscle development, etc. Worse, the famine lasted until 1322 in some places. And then because of the Hundred Years War, the cooling climate, etc., there were lots of food shortages after that. Many villagers and urban dwellers alike were chronically and dangerously malnourished.
The malnourished are vulnerable to disease. Modern research shows that most malnourished people die of disease, not starvation. In fact, this is what the UN is predicting for the unprecedented 20 million who may die in the Horn of Africa famine right now.
One of the most recent archeological digs in London indicates that the rate of transmission for the Black Death was too high for it to be exclusively from rats. It was likely spread through the air, according to Dr. Tim Brooks, an archeologist on a 2014 dig in London.
As for the rats, at various points, people were so hungry and desperate they likely would have eaten them if there were a lot around. When people are so desperate during a famine that they are eating bark off trees, they wouldn’t hesitate to eat a rat and would certainly find a way to catch it.
We particularly hate laying, so the blame for the plague is put on the rat because a) it is increasingly being shown to be outdated, b) reflects our own biases towards the Middle Ages — that medieval people were filthy mud-soaked drooling idiots — which aligns with North American cleanliness is godliness mentality, and this has the faintest odor of dismissing them, and c) most important of all, it makes it harder for us to see how malnutrition in developing nations could fuel a pandemic.
At a regional level (e.g., spreading from city to village or around a region), in addition to trade from peasant to merchant or city, there was a lot of movement of soldiers in 1347 with the Hundred Years War. This ended when the plague began to take hold and Edward III could no longer get loans to fund his attacks, but as his soldiers returned home, it’s possible they too could have carried it. This isn’t a strong link, but many of these pandemics were transmitted through wars and the movement of soldiers — e.g., the Justinian plague, Spanish Flu, etc. While wars bring food shortages, they also bring the movement of people.