The multi-port hub we usually talk about refers to the number of RJ-45 ports it has. So what is a port?
What is a port?
This acts as the conduit for communication between the device and the outside world. Ports encompass both virtual and physical ports. The phrase "virtual port" refers to the port situated inside the computer or switch router. Examples include: port 80, port 21, port 23, and so forth, within the computer.
Physical ports are also called interfaces. For example: RJ45 network port on computer backplane, switch router hub and other RJ45 ports. Phones using RJ11 sockets also fall into the category of physical ports.

About ports
Hardware Port
The CPU transfers data with peripherals through interface registers or specific circuits. These registers or specific circuits we can call them ports.
The ports in the hardware field are also called interfaces. Such as: parallel port, serial port, etc.
Software Port
Port in the software field? Generally refers to the communication protocol port for connection services and connectionless services in the network. This is an abstract software structure. Includes some data structures and I/O buffers.
Network Port
In network technology, port has several meanings. The ports of hubs, switches, and routers refer to the interfaces that connect other network devices. Such as RJ-45 port, Serial port, etc.
The port we're referring to in this context is not a physical port. Rather, it specifically refers to the port within the TCP/IP protocol, which is a logical port.
Protocol Port
If we compare the IP address to a house, we can say that the port serves as the door to and from the house. A real house only has a few doors. But an IP address can have many ports! Port numbers mark ports, and they are only integers.
On the internet. Each host sends and receives data packets through the TCP/IP protocol. The Internet routes each data packet based on the IP address of its destination host. One can see that there is no problem in successfully transmitting the data packet to the destination host.
Where is the problem? We know that most operating systems support multiple programs running at the same time.
Which process among the numerous ones operating concurrently should the target host direct the received data packet to? Obviously, we need to solve this problem and introduce the port mechanism.
The local operating system allocates protocol ports to those processes that require them. A positive integer identifies each protocol port.
Upon receipt of the data packet by the target host, the system routes the data to the appropriate port according to the port number. The procedure linked with this port will subsequently obtain the data and pause for the next batch of data to come in.
Ports are actually teams. The operating system assigns different queues to each process. The system pushes data packets into the corresponding queue based on the destination port. The process is waiting to use it.
In extraordinary situations, this group may exceed its limit. However, the operating system allows each process to identify and adjust its own group size.
Not only the process receiving the packet needs to open its own port. The process sending the packet also needs to open the port. The packet will identify the source port in this way. So that the recipient can successfully return the data packet to this port.