The first thing to note is that this is a physical law, not a mathematical identity. Those integrals are certainly not equal for arbitrary $\rho$ and $\mathbf v$. So we need to think about what those integrals are saying.
The first integral adds up the rate of change of fluid density at each point in the volume. Note that because of the linearity of the derivative, we can pull it outside the integral to get
$$
\iiint_V \frac{\partial \rho}{\partial t}d^3V = \frac{d}{dt}\iiint_V\rho d^3V = \frac{dM_{inside}}{dt},
$$
where $M_{inside}$ is the total mass of fluid inside the volume.
The second integral is adding up $\rho \mathbf v$, which is the flow rate of mass density in the fluid. It integrates this flow rate over the boundary of the volume, so it's finding the total rate at which fluid mass is leaving the volume. If you're having trouble seeing this, picture a tube of cross section $d^2S$ flowing through the surface at velocity $\mathbf v$. During a time interval $dt$, a fluid element of length $\mathbf {v}\cdot\hat{\mathbf{n}}dt$ passes through the surface. This element has mass $d^3M_{outflow} = \rho \mathbf {v}\cdot \hat{\mathbf{n}}d^2Sdt$, so the rate of mass flow out of that element of the surface is $d^3M_{outflow}/dt = \rho\mathbf v\cdot\hat{\mathbf n}d^2S$. Integrate all the surface elements and you get the total mass flow out of the volume:
$$
\iint_{\partial V}\rho\mathbf v\cdot\hat{\mathbf n}d^2S = \frac{dM_{outflow}}{dt}.
$$
Now, for mass to be conserved, the rate of mass leaving the volume must be equal to the rate at which the mass of the volume is decreasing. That is,
$$
\frac{d M_{inside}}{dt} = -\frac{dM_{outflow}}{dt}.
$$
Substituting our integrals gives
$$
\iiint_V \frac{\partial \rho}{\partial t}d^3V = -\iint_{\partial V}\rho\mathbf v\cdot\hat{\mathbf n}d^2S.
$$