TCP port 5900 is commonly used by VNC, a remote desktop and screen sharing protocol.
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.
A VNC server binds to 5900, and a client connects from an ephemeral source port.
After the TCP handshake, the two sides negotiate protocol options and authentication, then the server streams screen updates while the client sends mouse and keyboard events.
Many VNC implementations historically offered weak encryption or none, so the safe posture is to treat VNC as an internal only service or to wrap it in a secure tunnel such as SSH or a VPN.
From a security perspective, exposed 5900 is a common finding in scans and can lead to unauthorized desktop access if passwords are weak or the service is misconfigured.