A town is a human settlement larger than a village but smaller than a city. The size definition for what constitutes a "town" varies considerably in different parts of the world.
The word town shares an origin with the German word Zaun, the Dutch word tuin, and the Old Norse tun. The German word Zaun comes closest to the original meaning of the word: a fence of any material. An early borrowing from Celtic *dunom (cf. Old Irish dun, Welsh din "fortress, fortified place, camp," dinas "city").
In English and Dutch, the meaning of the word took on the sense of the space which these fences enclosed. In England, a town was a small community that could not afford or was not allowed to build walls or other larger fortifications, and built a palisade or stockade instead. In the Netherlands, this space was a garden, more specifically those of the wealthy, which had a high fence or a wall around them (like the garden of palace Het Loo in Apeldoorn, which was the example for the privy garden of William III and Mary II at Hampton Court). In Old Norse tun means a (grassy) place between farmhouses, and is still used in a similar meaning in modern Norwegian.
In Old English and Early and Middle Scots, the word ton, toun, etc. could refer to kinds of settlements as diverse as agricultural estates and holdings, partly picking up the Norse sense (as in the Scots word fermtoun) at one end of the scale, to fortified municipality at the other. If there was any distinction between toun (fortified municipality) and burgh (unfortified municipality) as claimed by some, it did not last in practice as burghs and touns developed. For example, "Edina Burgh" or "Edinburgh" (called a city today) was built around a fort and eventually came to have a defensive wall.