About TCP flow control.
This is a subject that we could talk about for days. The little details are important, but not always easy to understand. Let me try to tell you the basics.
1) The problem.
Suppose you have this network:
host A ---1 Gbps Ethernet--- host B
Host A wants to send a large file to B. How fast can it send the packets ? Well, it can look at its network-interface. It sees it is a 1Gbps interface, so it can send "at linerate" or "at linespeed", which in this case means 1 Gbps. No problem
Now suppose we have this network:
host A ---1 Gbps Ethernet --- routerX ---10 Mbps Ethernet --- routerY --- 1 Gbps --- Host B
Now how fast does host A needs to send its packets to transfer a file ?
If it sends at 1 Gbps speed, the link between routerX and routerY can not transfer all packets fast enough. routerX will try to buffer a little bit, but soon its buffers will be full. And routerX will start dropping packets. Host A doesn't get acks, and starts retransmitting. More packets. More drops are routerX. And the network is "congested" (meaning more packets than it can handle).
To fix this, host A must try to figure out how fast it can send.
This is called "flow control".
TCP has many ways to try and do flow control.
Both A and B will tell the other side how much data they can receive before they are overrun themselves. These are called "receive windows".
https://en.wikipedia.org/wiki/Congestion_window
TCP does something called "slow start".
On a new connection, TCP will start sending only one packet. And it times how long it takes to receive an acknowledgement (ack). When it receives the ack, it will send 2 packets. And the next time it gets acks back, it sends 4 packets. Etc, etc. This way TCP will start slowly using more and more bandwidth. But when it sends too much, it will not receive acks for the dropped packets it just sent earlier. Or the acks take longer to get back. TCP will then start to slow down a little. This way it tries to find the optimal speed at which it can send, without packet drops and retransmissions.
https://en.wikipedia.org/wiki/Slow-start
And there are more little tricks TCP does to try and find the maximum speed at which it can send (a.k.a. flow control). Don't worry if you don't understand all the details right away. This is not stuff for people new to networking. If you understand what flow-control tries to do, that is already a good first step.