Port 389 is used for LDAP, a directory protocol that many enterprise identity systems depend on.
A port is a transport layer number used together with an IP address and a protocol such as TCP or UDP to direct traffic to the correct service on a host.
A server process binds a socket to a port and listens, while a client typically chooses an ephemeral source port for outbound connections.
The combination of source and destination IP addresses, source and destination ports, and the transport protocol uniquely identifies a flow so the operating system can keep many conversations separate.
Firewalls, NAT, and scanners talk about ports because the destination port is the stable rendezvous point that exposes a service to the network.
Directory servers listen on 389 so applications can bind, search for users and groups, and read attributes that drive authorization decisions.
Most LDAP traffic is over TCP because it involves request and response exchanges and can include larger payloads.
UDP 389 also exists for CLDAP, a connectionless variant used in some discovery and lookup scenarios, which is why scans sometimes show both.
A typical real flow is: the client connects to port 389, performs a bind (often with a service account), runs searches using filters, and may upgrade to TLS with StartTLS before sending credentials if configured correctly.
Security wise, an exposed directory port can leak your entire org structure and enable credential attacks, so environments usually restrict 389 to trusted application networks and require StartTLS or use LDAPS on 636.