The F-statistics tells you if the model fits the data better than the mean. Or, in other words, if $H_0:\;R^2=0$ should be rejected.
See: WikpediaWikipedia
To illustrate that the formula given in the link is indeed used by summary.lm
:
x1 <- 1:10
set.seed(42)
x2 <- rnorm(10)
y <- x1+2*x2+rnorm(10)
fit0 <- lm(y~1)
fit1 <- lm(y~x1+x2)
summary(fit1)
#F-statistic: 14.1 on 2 and 7 DF, p-value: 0.003507
RSS0 <- sum(residuals(fit0)^2)
RSS1 <- sum(residuals(fit1)^2)
Fvalue <- (RSS0-RSS1)/(3-1)/RSS1*(10-3)
#14.10014
pf(Fvalue,2,7,lower.tail=FALSE)
#0.00350697