In classical EM I understand the electric and magnetic fields are invariant under the potential transformations $\varphi\to\varphi - \partial_t\chi$ and $\mathbf{A}\to\mathbf{A} + \nabla\chi$.
From here people often say this gives us a freedom to do something like choose $\nabla\cdot\mathbf{A} = 0$. I don't understand how we go from the above transformations to specifying properties that $\varphi$ and $\mathbf{A}$ satisfy.