A town is usually a place with a lot of houses, but not a city. As with cities, there is more than one way to say what a town is in different countries. In some places, it is a kind of local government.
In English, they also use the word "town" as a general word for places with a lot of houses (cities too). When they say "town" they are normally thinking of a big, important place. For example, London is a city, but people often call it "London town" ("the City of London" is a part of London where there are a lot of banks). Also, going from the outside to central London is to "go into town".
Generally, the difference between towns and villages or hamlets is the sort of economy they have. People in towns usually get money from industry (factories etc.), commerce (shops etc.) and public service (working for the town) not agriculture (growing food).
The number of people who live in a place does not tell us if it is a town or a village. In many areas of the world, for example India, a big village can have many more people than a small town. It is also difficult to say if a place is a town because today, some towns are becoming bigger, and in some places people live in a village or near a town and work in the town.
Sometimes a place is a city because it got the name "city" by law. However, people often say it is a town because it is small. In the Middle Ages, a place became a town by means of a charter, which gave it town privileges.
The United States [change]
In the United States of America, the meaning of the term town is different in each state. In some states, a town is a town if the state says it is. In other states, for example Wisconsin, a town is a town if it has special powers. In other states, for example Michigan, the name "town" has no official meaning and people use it for any place with a lot of people.
In the six New England states, a town is a smaller part of the county, and in these states, really a more important part than the county. In Connecticut and Rhode Island, counties are only on the map and have no power. In the other four states, counties are mostly places with law powers. The counties with other functions are mostly in New Hampshire and Vermont. In all six, towns do things that in most states counties do. In many of these towns, town meetings are the main form of government, so citizens can say what happens where they live by direct democracy.
In New York, a town is also a smaller part of the county, but with less importance than in New England. In New York, a town gives people more direct power than its county, giving almost all town services to places not in towns, called hamlets, and some services to places in towns, called villages. In New York, a town usually has some hamlets and villages. But, because villages have power without towns (they are independent) they can be in two towns or even two counties. Everyone in New York State who does not live in an Indian reservation (a special place for American Indians) or a city lives in a town, and perhaps in one of the town's hamlets or villages.
In Virginia, a town is similar to a city, but it can have a smaller number of people in it. By Virginia law cities are independent of counties (they have power without counties), towns are part of a county.
England and Wales [change]
English people often think that when a place has a cathedral it must be a city, but it is not true today. For example, Chelmsford is a town but it has a cathedral.
In the past, a place was usually a town, not a village, when it had a regular market or fair (a market, but not so often). There are some English villages (for example Kidlington, Oxfordshire) larger than some small towns (e.g. Middleham, North Yorkshire).