I'll try to dumb it down as much as I can:
With the advent of capitalism (or rather mercantilism) the first thinkers asked themselves the question: Why does shit cost money? Well, one of the ideas was that labor has inherent value and therefore something which takes one year to produce has much more value than something that is produced much more easily and quickly. This is what we call the labor theory of value. Sounds good, until we encounter a situation where this idea doesn't hold. There's the thought experiment of the mud pie factory, which produces pies made out of mud under heavy labor and time and yet no one would ever pay anything for mud pies. This was seen as an outright refutation of the labor theory of value and here we introduce: marginalism.
Marginalism is the idea that in fact the price of a commodity is decided by how much it is worth to the rest of society and its price was determined by what they would pay for it, based on the amount of satisfaction they can derive from it and of course how accessible it is. It is (or variations of it) what most economics even today still ascribe to.
But this doesn't tell the complete picture either. Now, Marx wasn't wrong in the concept he developed, but he wasn't completely thorough either and the law of value kept him busy for decades (and he ultimately could never finish developing it in its entirety). He took the labor theory of value and adopted it into his understanding of economics, which here first of all must be understood, just like everything else in Marxism, for example class, as a social relation. It argues that the worth of product is dependent on the socially necessary labor to produce it, except that Marx not just looks at the value a commodity in itself has as a result of it, but also that a commodity is never just produced and sold in an idealist scenario where you can blend out all the other influences and factors of societal organization. Therefore values fluctuate and are also dependent on the social relations (relations of productions) under which they arise and with the law of value then Marx supposes that capitalism operates in such a way that certain classes emerge in society who are putting their labor into the production of a commodity and the capitalist then takes the commodity, sells it on the market and extracts surplus value from it. Now of course this surplus value must come from somewhere, and this is where the injustice of the relationship between bourgeoisie and proletariat lies.
But how can Marxism hold true when we in the beginning established marginalism to be the superior theory? Well, today, we have a better understanding of Marxian "economics" (I put this in quotation marks because Marxian economics is not something that can be compared to liberal economics, which Marx viewed as a scam that serves to justify capitalist organization of society) in that we do not reject either. The core concepts of marginalism hold true in that the price of a commodity is influenced by what it costs to produce in raw materials as well as that consumer demand is needed to get rid of commodities on the market and consumer demand also influences the price. However, we also understand that Marx made the right observations:
First, the prices of raw materials are influenced by the labor put into it (they don't appear out of thin air after all and someone must work to generate them), second, we understand that consumer demand is not rational but a social relation that can be artificially generated, influenced and not accurately measured by the capitalist and we also understand that labor in itself must in fact have a value, for two simple and obvious reasons: First, the fact itself that a capitalist pays his employer to perform a task must demonstrate that the employer's labor has a value to him, and second, furthermore this value that is put into the commodity through labor must influence the price of the product and this is must ultimately be where the capitalist extracts surplus value.