There's three major parts to feudalism: military, political, and economic.
From a military perspective, the feudal aristocracy are a military caste. Medieval weapons, armor, and warhorses are expensive, and you pretty much need to train from childhood in order to wield them well. So the most efficient and effective military system tends to be to attach families to revenue streams (usually land rents) and tell them to defend it. These families then train their sons from a very young age to be high quality soldiers, and if the revenue system is sufficient they also keep other families as vassals or retainers to provide additional knights or men-at-arms. This starts to break down when transport technology and infrastructure becomes good enough and food becomes cheap enough to supply large armies in the field, and it becomes more cost-effective to hire large number of lower-quality commoner soldiers rather than maintaining an aristocratic military caste. It breaks down completely when gunpowder weapons become good enough to dominate the battlefield, since they're relatively cheap and it takes six weeks to train a peasant to be a decent musketeer compared with a decade or more to train a good man-at-arms.
From a political perspective, feudalism is handy when long-distance communication is difficult, slow, unreliable, and expensive. If you want to maintain rule over a large territory, you need someone trustworthy locally to administer your rule, he needs enough resources to hold the territory, and he needs enough independence to make it worth his while not to take advantage of the communication lag to just set up on his own. The feudal system fits the bill, with the key aspect that there's a hierarchy based on personal loyalty and reciprocal responsibilities between families. This ends when long-distance communication becomes fast, easy, cheap, and reliable.
From an economic perspective, there are three general factors of production: land, labor, and capital. All else being equal, increasing the supply of one factor of production makes the others more productive, but makes itself less productive due to declining marginal returns. For example, add farmland without adding farm laborers or farm equipment, and you get more harvest per laborer and per dollar worth of equipment, but you get less harvest per acre of land. In preindustrial society, capital stocks are negligible, so land and labor dominate. The supply of land is pretty much static while in the long run there's no shortage of labor, so whoever controls the land can skim off a fair amount of rent or taxes from the peasants. The equilibrium state is peasants barely making enough to feed themselves after paying rents, with the landowners skimming off all available surplus. This breaks down when 1) the age of exploration and European military dominance opens up wide areas of 'new' land to European colonization, and 2) the industrial revolution occurs, so a) capital starts competing with land as a way of making labor more productive, and b) economic growth starts outstripping population growth so labor becomes a scarce and valuable commodity.