How does one experimentally determine virial coefficients?
These coefficients can be calculated based on 2 ways:

1) Based on experimental data

In this method, from pressure-volume-temperature (PVT) data these coefficients will be calculated. Consider the following equation: 
$$\vartheta\left(\frac{P\vartheta}{RT} - 1\right) = B(T) + \frac{C(T)}{\vartheta} +\ldots$$
$$\vartheta = \frac{1}{\rho} =\mathrm{Molar\ volume}$$

This equation is a re arange form of Virial equation. Now accroding to this equation, if you plot the left hand side of aforementioned equation versus molar density, the intercept of that line represents second virial coefficient and the slope of that line is the third virial coefficient. If the curve was not a straight line, we should consider more virial coefficients for them. 

2) From potential functions.

In this method, the virial coefficients are calculated by potential functions such as L-J model, Kihara model, Exp-6 model and etc. The basis of This method is statistical thermodynamics.