For example, I can start an application on port localhost:8080 and if I go to the browser I can see my application. I understand that it is like a communication endpoint but no more.
Can someone explain to me in a simple way how a port works?
For example, what happens when I open Chrome, is it using ports?
To understand in a simple way what a network port is, you can use a simple analogy, for example, a computer has several physical ports (USB, VGA, HDMI, PS-2) and each one is responsible for a specific function, in networks the ports work in a similar way in a certain sense, each one has a specific function, regardless of whether you can configure them to use them with the protocol you want, I leave you a link with the most used ports in the TCP and UDP protocols (although there are more protocols) to give you a better idea, this is a simple example, you will have to investigate much more to learn more about it.
Most used TCP and UDP ports