Medieval parents, like modern parents, assumed that their children would inherit what they had. Indeed, because husbands and wives did not inherit from each other, everything normally went to the children, although a widow or widower might keep a life interest in property.
For servile peasants (on whom see more here), lords might insist on the children of the deceased paying a fine in order to inherit, if they were not living at home when a parent died. But since most of them were indeed living at home, they would just take up the house, the land, and the rents and labor dues their parents had paid.
It was more complicated for aristocrats, because, from the eleventh century onward, the lord of a castle generally owed allegiance to someone more powerful, and that powerful lord wanted to be sure that whoever inherited was in a good position to be helpful in providing that allegiance. If a castellan lord died with a son who was at least a "youth" (mid-teens), all was fine, the heir would swear allegiance and take up lordship of the castle.
But if the heirs were children or there was only a female heiress and not a male heir, it would get more complicated. In England, if any of the great barons who owed allegiance directly to the crown died without a suitable heir, the king would treat the girl or young boy as his "ward," taking care of the land and castle and collecting its revenues. The king would make sure an heiress married someone of whom he approved, who would be properly obedient, and might resist recognizing a young man as mature enough to take over.
The French king wielded less authority over his counts and dukes, and in many cases if a count died while his children were young, his wife would act as regent until they grew up. Such important counties as Flanders, Champagne, and Nevers were run by women regents for much of the late twelfth and thirteenth centuries.
Although the oldest boy, it was assumed, would take over his father's castle, younger brothers and sisters were not excluded from the inheritance. They however seem often to have believed that they were entitled to more than they got, and younger brothers might try to find an heiress of their own.