(i) When market price is higher than equilibrium price: There is excess supply and producers are not in a position to sell all they want to sell at the given price. This leads to competition between producers. Competition between producers leads to lowering of price.
Lowering of price raises demand which reduces supply. This continues till demand is equal to supply again at the original equilibrium.
(ii) When market price is lower than equilibrium price: There is excess demand and consumers are not in a position to buy all they want to buy at the given price. This leads to competition between consumers. Competition leads to rise in price.
Rise in price reduces demand while raises supply. This continues till demand is equal to supply again at the original equilibrium.