The renormalization group flow is defined in terms of rescaled variables, $\hat{x} = k x$, $\hat{\phi}(\hat{x}) = k^{(2-D-\nu)/2} \phi(\hat{x}/k)$ and renormalised couplings $\hat{m} = m/k^2$ and so on. $k$ is the running cut-off scale.
In these variables, the Green function [$G(x) = \langle \phi(x) \phi(0)\rangle$] is
$$\hat{G}(\hat{x};\hat{m},\hat{g},\dots) = k^{2-D-\nu} G(\hat{x}/k) \, . \qquad (*)$$
In principle $\hat{G}$ is a function of $\hat{x}$ and all the other couplings $\hat{m}$, $\hat{g}$, etc. and these couplings are all functions of $k$. At a fixed point of the renormalisation group however, we get $k\partial_k \hat{m} = k\partial_k \hat{g} = \dots = 0$. The couplings stop running. Then writing (*) as [The starred couplings are the coordinates of the fixed point]
$$ G(x) = k^{D+\nu-2} \hat{G}(kx;\hat{m}^*,\hat{g}^*,\dots) $$
and using the fact that $k$ is a silent variable [$G(x)$ does not depend on $k$ by construction] provides a scaling form. Indeed, since $k$ drops out we can choose it to be $k=1/x$ and get
$$ G(x) = x^{-D-\nu+2} \hat{G}(1;\hat{m}^*,\hat{g}^*,\dots) \, .$$
Note that this reasoning also works close to [but not exactly on] the fixed point. In that case, the couplings behave as $\hat{m} - \hat{m} \sim k^{\eta_m}$, $\hat{g} - \hat{g} \sim k^{\eta_g}$ and so on. Then we get
$$ G(x) = k^{D+\nu-2} \hat{G}(kx;\hat{m}^*+\delta m \, k^{\eta_m},\hat{g}^*+\delta g \, k^{\eta_g},\dots) \, .$$
Assuming that $\eta_m<0$ all the other exponents are positive provides
$$ G(x) = k^{D+\nu-2} \hat{G}(kx;\delta m \, k^{\eta_m},\hat{g}^*,\dots) \, , \qquad (**)$$
if $k$ is small enough. Note that if $\delta m$ is very small, then (**) holds for a wide range of values of $k$. Then choosing $k=1/x$ again provides
$$ G(x) = x^{-D-\nu+2} \hat{G}(1;\hat{m}^*,\delta g \, x^{-\eta_g},\dots) \\
\hspace{2.7cm} = x^{-D-\nu+2} \hat{G}(1;\hat{m}^*,[(\delta g)^{-1/\eta_g} \, x]^{-\eta_g},\dots) \\
\hspace{-1.5cm} = x^{-D-\nu+2} F(x/\xi) \, . $$
This tells us that the correlation length diverges as $\xi \sim (\delta g)^{\eta_g}$ as we get close to criticality.
Note that I made a strong assumption on the exponents $\eta_i$. In practice however you do not need to make this assumption. You can compute theses exponents by linearising the renormalization group flow close to the fixed point. Then you know the sign of all of them. It turns out that very often you get a small number of negative exponents.
Renormalization is a huge topic that can be interpreted in different ways and pops up all over physics. My favourite introductory book on the topic is 'Lectures on phase transitions and the renormalization group' by Goldenfeld.