An example might help to illustrate. Suppose, in a causal modeling framework, you're interested in determining whether the relation between $X$ (an exposure of interest) an $Y$ (an outcome of interest) is mediated by a variable $W$. This means that in the two regression models:
$$\begin{eqnarray}
E[Y|X] &=& \beta_0 + \beta_1 X \\
E[Y|X, W] &=& \gamma_0 + \gamma_1 X + \gamma_2 W \\
\end{eqnarray}$$
The effect $\beta_1$ is different than the effect $\gamma_1$.
As an example, consider the relationship between smoking and cardiovascular (CV) risk. Smoking obviously increases CV risk (for events like heart attack and stroke) by causing veins to become brittle and calcified. However, smoking is also an appetite suppressant. So we would be curious whether the estimated relationship between smoking and CV risk is mediated by BMI, which independently is a risk factor for CV risk. Here $Y$ could be a binary event (myocardial or neurological infarction) in a logistic regression model or a continuous variable like coronary arterial calcification (CAC), left ventricular ejection fraction (LVEF), or left ventricular mass (LVM).
We would fit two models 1: adjusting for smoking and the outcome along with other confounders like age, sex, income, and family history of heart disease then 2: all the previous covariates as well as body mass index. The difference in the smoking effect between models 1 and 2 is where we base our inference.
We are interested in testing the hypotheses
$$\begin{eqnarray}
\mathcal{H} &:& \beta_1 = \gamma_1\\
\mathcal{K} &:& \beta_1 \ne \gamma_1\\
\end{eqnarray}$$
One possible effect measurement could be: $T = \beta_1 - \gamma_1$ or $S = \beta_1 / \gamma_1$ or any number of measurements. You can use the usual estimators for $T$ and $S$. The standard error of these estimators is very complicated to derive. Bootstrapping the distribution of them, however, is a commonly applied technique, and it is easy to calculate the $p$-value directly from that.