$$x_1'=f_1(t,x_1,...,x_n) \\ x_2'=f_2(t,x_1,...,x_n) \\ ....... \\x_n'=f_n(t,x_1,...,x_n)$$
This a system of equations, now the text book says let's differentiate the first equation of the system with respect to $t$. Then we get, (I dont understand how this is )
$$x_1''= \frac{\partial f_1}{\partial t}+ \sum_{i=1}^{n}\frac{\partial f_1}{\partial x_i}x_i'$$
Now this is confusing for me because if when take an example(differentiating with respect to $t$, $x_1$ is seen as a constant then?): $$x_1'=2t^2x_1$$ $$x_1'=4tx_1 \neq 4tx_1+ 2t^2??$$
No: the co-ordinates $x_i$ are variables that depend on $t$ (else how could you be looking at differential equations with $dx_i/dt$ in them?). "$'$" here means $d/dt$, the total derivative that is evaluated as in your equation with the sum of partial derivatives.
Your last statement is not clear: if you mean $x_1' = 2t^2 x_1$, then $$ x_1'' = \frac{d}{dt} x_1' = \frac{d}{dt} (2t^2 x_1) = 4t x_1 + 2t^2 x_1', $$ using the product rule.