Socially necessary labour time in Marx's critique of political economy is what regulates the exchange value of commodities in trade and consequently constrains producers in their attempt to economise on labour. It does not 'guide' them, as it can only be determined after the event and is thus inaccessible to forward planning.
Unlike individual labour hours in the classical labour theory of value formulated by Adam Smith and David Ricardo, Marx's exchange value is conceived as a proportion (or 'aliquot part') of society's labour-time.
Marx did not define this concept in computationally rigorous terms, allowing for flexibility in using it in specific instances to relate average levels of labour productivity to social needs manifesting themselves as monetarily effective market demand for commodities. In addition, although it is axiomatic that socially necessary labour input determines commodity values, precise numerical calculation of such an input in relation to the value of a given commodity, i.e. the empirical regulation of the values of different types of commodities, is exceedingly difficult, due to incessantly shifting social, physical or technical circumstances affecting the labour process.
In a market economy, labour expenditures producing outputs and the market demand for those outputs are constantly adjusting to each other. This is a complex process, in which enterprises operating at varying levels of productivity and unit-costs compete with each other in responding to the expansion and contraction of total market demand for their output. In the third volume of Das Kapital, Marx discusses how the market value (or "regulating price") of a commodity may be determined under different conditions of demand and productivity.
A given mass of new value is produced in a given time, but if and how this new value is realised in money terms and distributed as income and reinvestment is finally established only after products are sold at specific market prices. If the market for a commodity is oversupplied, then labour-time has been expended in excess of what was socially necessary, and exchange value falls. If the market for a commodity is undersupplied, then the labour-time expended on its production has been less than what is socially necessary, and exchange value rises.