When expanded, $(1/8)\phi^2(\phi-2)^2$ contains quadratic, cubic, quartic (2nd, 3rd, 4th degree) terms in $\phi$. So it's a polynomial with these monomials. The final form of the potential places general coefficients in front of these terms.
The quadratic term is universally written as $(1/2)m^2\phi^2$ because it contributes the usual mass term $m^2\psi$ to the Klein-Gordon equation of motion. Note that the potential has units of $m^{d+1}$ where $d+1$ is the spacetime dimension in your conventions because when integrated over $length^{d+1}$ spacetime, we should get a dimensionless action.
It follows from the $m^{d+1}$ dimension of $m^2 \phi^2$ that $\phi$ has the dimension of $m^{d/2-1/2}$. In the cubic term, $\phi^3$ therefore has dimension $m^{3d/2-3/2}$ and we have to multiply it by a coefficient with units $m^{-d/2+5/2}$ to obtain another $m^{d+1}$ term. This $m^{-d/2+5/2}$ coefficient is written as a product of the same power of $m$, the mass from the quadratic term, and a $\lambda_3$ which is may be kept dimensionless.
In the same way, the quartic term contains $\phi^4$ whose dimension is $m^{2d-2}$ but we need the dimension of the whole $V$ to be $m^{d+1}$ so we need to add $m^{d-3}$, dimensionally speaking, which the formula does, and it adds a new dimensionless coefficient $\lambda_4$ to this term.