This is a very important question, that concerns the problem of the ‘invisible hand ‘and of the ‘tendency’ to equilibrium and, more technically, implies the distinction between static and dynamic models, and, in dynamic models, the question of stability or instability of equilibrium.
Formally, the demand and supply model can be written as:
$$D=D(p)$$
$$S=S(p)$$
$$D=S,$$
where the first two equations represent demand and supply functions, and the third one is the equilibrium condition.
If equilibrium exists, we have a usual graph of market equilibrium, as in the picture below:

It looks very simple, but it is a static analysis, that is, it tells us what is the market equilibrium, but not whether and how the market can reach it, for instance, if we start from a non-equilibrium point like $F$. What happens? The market will remain in $F$? Or prices and quantities move to reach equilibrium? Or they move leading the system further away from equilibrium?
Static equilibrium analysis can’t answer this question. It is necessary to turn to dynamical analysis, that is an analysis that involves time, and in which the variables change in time.
Dynamic analysis is conceptually and formally different from static analysis. In dynamic analysis we have to make further assumptions, dynamic assumptions, in the model, that is assumptions on how variables evolve in time, and subject to what ‘forces’.
$$***$$
To give an idea of what is a dynamic analysis in economics, and on which factors can depend stability or instability of market equilibrium, we can look at a famous example of dynamic analysis of a market: the Cobweb model $^{(1)}$.
Cobweb model can be considered a dynamic version of the market equilibrium model.
The crucial feature of dynamic models, as we said, is introduction of time: now, time flows, there are many periods (years, months or what you want) and the variables change in time.
As it is a dynamic model, the Cobweb model makes assumptions about how prices and quantities change in time, and subject to which 'forces.
Moreover, in the Cobweb model, hypotheses are introduced about the expectations of agents on future prices.
Possible assumptions about the dynamics of prices and quantities in a cobweb model, can be the following:
$$D_t= a+bp_t$$
$$S_t=a_1+b_1p_{t-1}$$
$$D=S$$
where $a,b,a_1,b_1$ are constant parameters. Time $t$ is discrete, and we can see in the second equation that supply reacts to price with a lag of one period, while demand depends on current price. There is a rationale for this hypothesis on supply, concerning the fact that production takes time, and producers believe that the price in the next period will be the same as the price in current period: this hypothesis on expectations is called static expectations.
The third equation is the market clearing condition, that is that demand equals supply.
This model, mathematically, is a model of linear difference equations, that can be solved using the theory of finite difference equations.
But the Cobweb model has a nice graphic representation, that makes intuitive to understand it.
Using this graphic representation, we can approach the problem of stability of equilibrium you raised: is market equilibrium stable? What are the factors that imply that equilibrium is stable or not?
The first result will be that stability depends on the relative slopes of demand and supply functions, or better on the elasticities of demand and supply.
We can see it with an example in the pictures below$^{(2)}$.


In the first picture we have the representation of a stable equilibrium: the system, starting from a price $P_0$, moves according to the arrows, drawing graphically a kind of cobweb, and leading the system toward the equilibrium point.
On the right of the picture, we have the trend over time of the price, which, cycling, converges to the equilibrium price $P^e$.
In the second picture, we have an unstable equilibrium. Starting away from equilibrium, the dynamics leads the system further away from equilibrium: this can be seen in the picture on the right, where the cycle of the price becomes 'explosive'.
What are the factors that make the equilibrium stable or unstable? As one can notice in the pictures, the difference is in the slopes of demand and supply functions. It can be analytically proved that the relative elasticities of demand and supply determine the stability or the instability of equilibrium.
It must be said, moreover, that the way the agents form expectations has also a crucial role in the model, but this is a too complicated question to be dealt with here$^{(3)}$.
$$***$$
Of course, there are other dynamic models that analyze the stability of the equilibrium of competitive markets, and analysis of the stability of competitive equilibria is a vast field of research.
The problem of the stability of equilibrium, in general, is exactly what you said, whether there are forces at work in actual economies that tend to drive an economy toward an equilibrium.
This is very crucial question, first of all for equilibrium analysis, as it would be useless and odd an analysis of equilibria that an economy cannot reach, except by chance.
But I choose to illustrate the cobweb theorem, as it is an example easily understandable using pictures, and also a very famous example that gives an idea of what a dynamic analysis in economics can mean.
As you can see, you have raised an important, but complicate question.
(1) The classical paper on Cobweb is Nerlove (1958).
(2) Graphically, the pictures look like cobwebs, hence the name of the model.
(3) In the original Cobweb model of Nerlove the assumption is that of adaptive expectations, different from static expectations.
References
Nerlove, M., (1958), Adaptive expectations and Cobweb Phenomena.
Gandolfo, G., Economic Dynamics, Springer, 2009