Difficulty understanding the use of arbitrary function for the worst case running time of an algorithm
I think that the point that the authors are trying to make is the following:

The exact running time depends on the input.

When we say that the running time of insertion sort is $O(n^2)$, what we really mean is:

The worst-case running time of insertion sort is $O(n^2)$.

Actually, we could be even more verbose, and mention that by worst-case we mean worst case with respect to the length of the array:

The worst-case running time of insertion sort, in terms of the length $n$ of the input, is some function $f(n)$ which belongs to the class $O(n^2)$.

This is equivalent to the following claim:

There exists $C$ such that insertion sort takes time at most $Cn^2$ when running on an input of length $n$.

Note that there is no need to specify a lower bound on $n$ – if the running time is bounded by $C_1n^2$ for all $n \geq N$, then it is bounded by $C_2n^2$ for all $n \geq 1$. You can take $C_2$ to be the maximum between $C_1$ and the worst-case running times on inputs of length at most $N$.