at least in the case of the (favoured) slow-roll scenarios, inflation stops rather automatically at a certain point.
How do slow-roll models work? One assumes that there is a scalar field $\phi$ with potential $V(\phi)$, which is minimally coupled to gravity, i.e.
\begin{equation}
S \supset \int d^4x \sqrt{-g}\left( \frac{1}{2}g^{\mu\nu}\nabla_{\mu}\phi \nabla_{\nu}\phi - V(\phi) \right).
\end{equation}
The logic of slow-roll inflation is that the inflaton field $\phi$ rolls down e.g. a rather flat potential, i.e. while $\phi$ keeps rolling the potential energy of the field is roughly constant, so it almost has the effect of a cosmological constant. But only almost, because $\phi$ will at a certain point reach a rather steep region of $V$ and inflation can stop.
This may help to get an intuition.
More mathematically, one can define slow-roll parameters $\epsilon$ and $\eta$ as follows:
\begin{equation}
\epsilon = \frac{1}{2} \left(\frac{V^{\prime}}{V}\right)^2
\end{equation}
and
\begin{equation}
\eta = \frac{V^{\prime \prime}}{V}
\end{equation}
where the $\prime$ denote derivatives with respect to $\phi$. It can be shown that the conditions
\begin{equation}
\epsilon \ll 1 ~~~ \text{and} ~~ |\eta| \ll 1
\end{equation}
are sufficient to obtain inflation (in the sense of sufficiently rapid expansion).
If one of those two conditions fails to hold, e.g. because the potential is somewhere too steep or the curvature is too large, then slow-roll inflation ends.
In fact, making inflation stop is not so hard for model builders. The more complicated problem is to find a system with flat potential that remains flat after accounting for quantum corrections (and possibly other stuff).
Thus, your question essentially boils down to how does $V$ look like. And that we don't know.
I hope that this is helpful!
Recommendations for reading:
TASI lectures on inflation by Daniel Baumann
psm