This is a very wide topic indeed.
Basically, there are two ways to measure and control the speed of a connection: physical speed and logical speed.
Physical speed is determined by the technology, protocol and sometimes the physical conditions of the line. For example, a Fast Ethernet has a physical speed of about 100 Mbps, meaning that it could in theory transmit information at 100 Mbps at physical layer (brute bits). Most current optical fibre connections can reach several gigabit per second of brute speed.
In some case, the physical conditions may affect the physical speed for a particular link. In those cases, a initial negotiation when the link is established determines the maximum physical attainable speed. This is how old modem and current xDSL systems work.
On the other hand, there is a logical speed in the line, usually lower than the physical connection. In most current systems, at a logical (more abstract) level, the information travels in packets. Ethernet for example uses Ethernet packets, which usually is comparable to IP packets but not always. ATM networks use ATM packets that contains 53 bytes of data (48 of them are payload).
Now the relationship between both speeds: single packets travel at physical speed. If you have at home a GPON (fiber) connection, it may have a physical speed of 2.4 Gbps. Every GPON packet will travel at 2.4 Gbps. So how the speed provided to the user is limited? Limiting the packet rate at a higher level. Send a 1 Kbps packet every 1 ms, and you just limited the perceived speed to 1 Mbps. This can be easily done by software, allowing all kind of traffic control, burst control, congestion control, monitoring, etc.
Deploying a high-speed physical connection to provide low-speed logical speed services has several advantages:
- The same physical link can serve for different logical speeds. Same technology makes the deployment easier and the manufacturing cheaper.
- Logical speed can be modified to any value, at any time, simply by a change in the configuration of one or more devices. No need to replace equipment unless you need to provide more speed that the one supported by the physical layer.
- The same physical link can be used by more people, and this is key. If you have a 1 Mbps service using fibre or cable connection, the physical layer would be unused between your packets. But it can be used for other user's packets, it is shared. And it is aggregated in the network hierarchy. A 10 Gbps link can carry thousands of low-speed link from thousands of users.
I hope this is clear and answers your question, but certainly it is just a very simplified overview. Feel free to ask more questions or clarifications.