Feudalism represents a system where a ruler loans lands to his inferiors (vassals) in order to pay for their services. Generally this was most often in the form of army duty, where the vassal would gather an army from the population of the land he had been given, but any resources the vassal managed to grow or find on the land was by right the ruler's property so the ruler could seize any resources from his vassal as well.
In exchange the vassal was allowed to rule the land he had been given which included loaning it to his inferiors. Usually he lent small provinces of "his lands" to knights in order to support a large army himself. This gave vassals quite a large military power and it was not uncommon that vassals in the absence of a king would fight each other for different reasons.
Those vassals (or knights) that had the smallest provinces couldn't lend their lands to someone else and they were still legally obliged to support their rulers so "they had to work the lands they had been given". This would obviously be impossible for themselves to do on their own and in the same time they couldn't fund a workforce because they weren't paid to rule (in money). Instead they allowed citizens to sign contracts with the vassals (or knights) which allowed the citizens to work the lands for free and in exchange they was given a bed, food and protection from their ruler. These citizens are called serfs and it was not uncommon either that they were levied into the military along with their ruler when the need arose.
In practice the land that the vassal hand been allowed to loan was treated as their property. This contract was not legally inherited by their offspring, but they were allowed to resign the contract if they were willing to continue the services that their fathers had given before them. Regardless, their children inherited the lands without resigning the contract and thus they were free from any responsibility the contract enforced. This was illegal but eventually due to the fact that almost all vassals did this and that the military power of the country was technically in the hands of the vassals, the rulers couldn't help it and later even legalized this practice. This was why the feudal system broke down.