There are many ways to arrive at filter coefficients, depending on your specs. But from your question I assume that you're talking about basic second-order building blocks (biquads). Also here there are several possibilities, but one standard approach - and that's probably the one you're after - is to start with the second-order transfer function of an analog filter (low pass, high pass, etc.), and then use the bilinear transform to transform the filter to a corresponding discrete-time filter.
For a low pass filter, the steps are
- start with the transfer function of a normalized second-order continuous-time low pass filter: $$H(s)=\frac{1}{s^2+\sqrt{2}s+1}\tag{1}$$
- use the bilinear transform $$s=k\frac{z-1}{z+1}\tag{2}$$ to obtain the discrete-time transfer function
$$\begin{align}H_d(z)&=H\left(k\frac{z-1}{z+1}\right)\\&=\frac{1}{k^2\left(\frac{z-1}{z+1}\right)^2+\sqrt{2}k\frac{z-1}{z+1}+1}\\&=\frac{z^2+2z+1}{(k^2+\sqrt{2}k+1)z^2+2(1-k^2)z+k^2-\sqrt{2}+1}\\&=\frac{1}{k^2+\sqrt{2}k+1}\cdot\frac{z^2+2z+1}{z^2+\frac{2(1-k^2)}{k^2+\sqrt{2}k+1}+\frac{k^2-\sqrt{2}k+1}{k^2+\sqrt{2}k+1}}\tag{3}\end{align}$$
- choose the constant $k$ depending on the desired cut-off frequency of the discrete-time filter. If $\omega_0$ is the desired normalized $3$ dB cut-off frequency of the discrete-time filter, i.e., $\omega_0=2\pi f_0/f_s$ where $f_s$ is the sampling frequency, then $k$ must be chosen as $$k=\frac{1}{\tan(\omega_0/2)}\tag{4}$$
Eqs $(3)$ and $(4)$ completely specify the desired discrete-time filter.
Note that the coefficients in Eq. $(3)$ can also be written in terms of $\sin(\omega_0)$ and $\cos(\omega_0)$. This is the form that you find for instance in Robert Bristow-Johnson's audio EQ-cookbook. In order to rewrite $(3)$ in that form, note that $k$ can be written as
$$k=\frac{1+\cos(\omega_0)}{\sin(\omega_0)}\tag{5}$$
and $k^2$ can be written as
$$k^2=\frac{1+\cos(\omega_0)}{1-\cos(\omega_0)}\tag{6}$$
Plugging $(5)$ and $(6)$ into $(3)$ and using a bit of algebra will give you the transfer function of a discrete-time low pass biquad with normalized cut-off frequency $\omega_0$ in the following form:
$$H_d(z)=g\frac{z^2+2z+1}{z^2+a_1z+a_2}$$
with
$$\begin{align}g&=\frac12\frac{1-\cos(\omega_0)}{1+\sin(\omega_0)/\sqrt{2}}\\a_1&=-\frac{2\cos(\omega_0)}{1+\sin(\omega_0)/\sqrt{2}}\\a_2&=\frac{1-\sin(\omega_0)/\sqrt{2}}{1+\sin(\omega_0)/\sqrt{2}}\end{align}$$
These formulae and the ones for biquads with other characteristics (high pass, band pass, etc.) can be found in Robert Bristow-Johnson's audio EQ-cookbook. The derivations for the other filter types are very similar to the one for the low pass filter shown here.