This method is called comparing the full and reduced model. Let's say for example, we have four variables and we want to check out if the fourth variable is significant or not. The NULL hypothesis is $\beta_4=0$. What you're doing is comparing the FULL model $\beta_1+\beta_2+\beta_3+\beta_4$ to a REDUCED model it.i.e.$\beta_1+\beta_2+\beta_3$.
If there is a significant difference between the two then clearly $\beta_4$ added something over and above the REDUCED model. In which case we reject the null hypothesis and conclude $\beta_4\neq0$. Also, instead of just testing $\beta_4$, i can test $\beta_3$ AND $\beta_4$ at the same time by comparing the FULL model of $\beta_1+\beta_2+\beta_3+\beta_4$ to a REDUCED model of $\beta_1+\beta_2$, and so on. That's why the authors are indexing it as $q$ and $p$ because either $q$ or $p$ can go up to any length.
The F test basically takes the residual sums of squares of the reduced model and subtracts the the residual sums of squares of the full model, and then compares it (through division) to the residual sums of squares of the full model. (after appropriately dividing each of them by the appropriate degrees of freedom). Remember, residual sums of squares is a measure of how well/unwell the model fit, because the residual is what's left over after you subtract your predicted value from your observed value.