The widespread diffusion of TCP over the Internet has motivated a significant number of analytical studies in TCP modelling, the most important of which are presented in this tutorial. The simplest approaches describe the dynamics of an individual source over a simplified network model (e.g. expressing the network behaviour in terms of average loss rate and latency). These models allow us to derive accurate estimations for the long-term TCP throughput under different network settings. More detailed techniques model the behaviour of a set of TCP connections over an arbitrary complex network. The latter are able to capture the network dynamics and effectively predict the closed-loop interaction between TCP and traffic management techniques. As an example the derivation of sufficient stability conditions for a network of RED queues is provided.