A port is a number that identifies a network service on a machine. A program "listens" on a port to accept connections; a listening address of 127.0.0.1 stays local whereas 0.0.0.0 is reachable from outside. ss -tlnp lists listening TCP ports.
Example
ss -tlnp