Depends on the culture and technological advancement of the kingdom. My explanation deals with the historical side of the inner workings of kingdoms.
For medieval-style kingdoms, the feudalistic manor system is often used. It meant that the king is the protector of his subjects, which includes the nobles, and commoners (free men). In return, the nobles give military service to their overlord (king). Commoners do likewise (nobles). Honor is highly-valued, and your oath of fealty could make or break you.
Also, kingdoms can be ruled by a king, or queen. Principalities function like a kingdom, only difference is, the title of its ruler is a Prince. Same in duchies (dukes), and counties (count). An Empire is ruled by an emperor, and is a combination of multiple nationalities and races under one sovereign.
As for the titles, one cannot assume the title of a king or emperor so easily. One must be able to convince the other rulers of other kingdoms or states to recognize the title of being a king/emperor, before one can claim legitimacy to the title. Remember, titles have a hierarchy too. Emperors are considered the highest title holders, followed by kings, then princes, grand dukes, and dukes. Counts, viscounts, margraves, etc., are lower-tier nobles in medieval era...though in Victorian Europe, these became merely titles.
Also, you have to consider the court. In medieval era, the court serves as the kingdom's capital, so it meant that if the court is in Munich, the present capital is Munich. If it is moved to Berlin, then it is Berlin. There's also the thing called 'court politics' where various factions inside the king's court fight over the right to influence the king in his decisions. Court politics can make or break a kingdom, such as the case of Imperial China. The court may consist of ministers, wives, concubines, eunuchs, ladies- and men-in-waiting, and/or priests, depending on the culture of your kingdom.
Now if we talk about villages, towns and cities, usually, a village is the community that grew beside a lord's manor. Serfs or commoners farm or render service to their local lord in return for his protection. As car transport is non-existent during those times, it's easier to live nearby a lord's manor than to travel from a faraway town just to work in a day.
Towns and cities are usually born out of trade necessities. The first towns are stopovers of merchant caravans trading in-between kingdoms, and these towns eventually grew into cities. If I remember, to become a city, one has to have a charter to be recognized as such.
A kingdom may contain a province, but this is prevalent in early modern kingdoms. Medieval kingdoms often are subdivided into fiefs, ruled by a lord that is (ideally) loyal to his sovereign.
That's why when a local lord rebels against his king and transfers his allegiance to another king, it could result to wars.