What it's for
Port 631 is the default port for IPP (Internet Printing Protocol), the modern standard for network printing that largely replaced the older LPD protocol. It's what powers most contemporary "print to a network printer" experiences, including printer discovery, submitting jobs, checking status, and querying printer capabilities — and it's the protocol underlying CUPS (Common Unix Printing System), used across Linux and macOS.
Protocol basics
IPP runs over TCP and is actually built on top of HTTP — IPP requests are structured as HTTP POST requests with a specific IPP payload format, which is part of why it integrates cleanly with existing web infrastructure and why some printers even expose a basic web interface on the same port. This HTTP foundation also makes IPP more extensible than LPD, supporting richer metadata about job status, printer capabilities, and error conditions, along with optional TLS encryption for the connection.