The capitalist system renders things and actions (cars, apples, shining a shoe) into commodities, that is, objects and services exchanged for money. According to capitalist theory, the value of each thing is determined by market principles, a complex set of consumer choices about what is desirable and what is not: what consumers desire more, they will pay more for; what they do not desire, they will deem worthless, and will not buy. Thus things which consumers deem more desirable are more valuable.
Karl Marx argued against the market theory of value, which he believed was an obfuscation designed to hide the real source of value, which is none other than human labour. Marx believed that things only have value because of the human labour power that was expended on making them, and that the more labour power that was spent making things, the more valuable they are. (Marx was more focused on products than services in general.)
Well actually, Marx qualified the labour theory of value a bit. He said that it was the amount of socially necessary labour time embodied in a commodity which gave that commodity its value. Here he was acknowledging that the actual time it takes to make something may vary, depending, say, on the skill of the artisan or the technology utilized in the production process. If it takes me two hours to make a cake and sneff or any of his able colleagues one hour, then one hour is the socially necessary labour time involved, and will determine the value of the cake. I'm just slow and disorganized; it doesn't mean my cake's worth more. Another example: modern factories can produce chairs much more quickly than was the case fifty years ago, but that doesn't necessarily mean that older chairs are worth more (except to collectors); the amount of socially necessary labour time has simply changed as the means of production have evolved. Inefficiency, then, does not increase value.
In recognizing that value comes from labour, Marx was really only building on the theories of his predecessors and fellow political economists, primarily Adam Smith and David Ricardo. But Marx went further than they had, recognizing that what workers are selling under capitalism is not primarily the fruits of their labour, but rather their labour itself. Capitalists pay wages to workers which are not really equivalent to the total value of their labour - the value of the things they produce. Instead, workers are paid a subsistence wage which will allow them to survive. Over and above that amount is a surplus, the value of which, said Marx, is retained by the capitalist; this surplus value is what allows the capitalist to make a profit. For Marx, this was not a good thing: it was exploitation of workers by capitalists.
At root Marxism is a humanist theory. Marx believed that it was a fundamental condition of humanity to labour and produce useful things. Capitalism alienates workers from the fruits of their labour, which are not theirs to keep, use, or exchange; instead, these fruits are owned by capitalists. And of course workers are not able to realize the true value of these fruits - which, remember, only have value because they embody the workers' labour - instead realizing only a portion of that value, and in a condition of distance from those products. Think of a factory assembly line, for Marx in many ways the ultimate dehumanizing horror: no one has any connection with the production line's end product, instead knowing only their tiny own movement: the welding of a piece of metal, the folding of a piece of paper, the turning of a screw. Marx believed that only when people are freed from such horrifying violations of their humanity and reconnected to the products of their labour would they be fulfilled and free.