In more detail
An IP address gets traffic to the right machine and the port gets it to the right program on that machine. Web servers listen on 80 (HTTP) and 443 (HTTPS), SSH on 22. IANA divides the range into well-known ports (0–1023), registered ports (1024–49151) and dynamic ports (49152–65535). For outgoing connections the operating system picks a temporary source port; Linux uses 32768–60999 by default. Ports are tied to a transport protocol (TCP or UDP), and a Firewall usually decides which ones are reachable.
Why it matters
"Address already in use" means another program already holds the port; "connection refused" usually means nothing is listening on it. Every open port is something an attacker can probe, so close the ones you do not need. On Linux and macOS, listening on a port below 1024 normally needs administrator rights.
Example
The address 203.0.113.5:443 means port 443 on that machine. On Linux, ss -tln lists the TCP ports your computer is listening on. Look any port up with the Port Number Lookup, or see Common Network Ports Cheat Sheet.