Let's imagine the market demand for petrol increases because the demand for automobiles, a complimentary good, has increased. Simply put, with more cars, more petrol is needed. Intially, the market is in equilbirum at (Q1, P1). When the market demand for petrol increases, we see the demand shifts outwards from D to D1. A new equilibrium is formed at (Q2, P2). Essentially, the output of petrol has increased and so has the price.
Prices signal where resources are needed and where they are not needed in society. In this case, price mechanism in the market has naturally indicated a higher price for petrol at the new equilbrium due to an increase in demand for petrol from consumers. This higher price is an indication
i) suppliers should expand output if they can (whether or not this is possible is determined by elasticity of supply) and
ii) there is an incentive for new firms to join the market.
Since resources are assumed to be limited (defined by scarcity), we can image resources may need to be rellocated from another industry to the petrol industry (for example, a machine which has multiple uses) for both situations i) and ii).