At work so sorry if this is brief and vague but the general idea is that individual firms setting prices based on their information on their costs communicates information about the cost of various inputs (labor, raw materials, etc.) and other firms will do the same in response to those prices changes. This allows for “efficient” decision making throughout the market based on the prices for goods/sevices and allows for quick responses to changing conditions that ensures most firms will produce an optimal amount of goods and any that don’t will fail.
The (old) critique of planned systems is that they can’t possibly process all that information centrally in as effective of a way and aren’t able to make adjustments quick enough as a result. This was somewhat true way back in the days of the USSR as it required a lot of planners to plan goods production and we’re also unable to quickly communicate things like inventory levels, etc.
Nowadays every major company (Amazon, Walmart, etc.) centrally plans their own production because computers have made it much easier to do all that information processing. Firms that tried to internally have a “market” approach like Sears have failed.
I’d recommend the book “ The people’s republic of Walmart” for a deeper dive into this.
Edit: Added some more details and clarified some sentences.