Answer:
Rats and unsanitary living conditions were the primary reasons
There were outbreaks of Plague throughout the Middle Ages, due to the unsanitary conditions of the time (open sewers were common). It was borne by fleas which spread via the rats. Rats were often aboard ships of cargo to other countries, and the plague spread to other countries via the rats. In turn, fleas which carried the disease jumped onto people, infecting them.
In the case of the 1665 plague, this particular outbreak originated in Holland. King Charles II had already stopped trade with Holland in 1663 in order to minimise the chance of it spreading to England, but, within two years, the plague arrived on the streets of the poorer areas of London.
The Great Fire of London which occurred in 1666 was a blessing in disguise. It wiped out the rats, the fleas and hence, the disease.