When printing from a Windows device to a network connected printer, you can usually provide the name of the printer, and Windows will be able to find the printer on the network. However, you may occasionally need to specify an IP address and the network port that are used.
TCP
On Windows, TCP 139, TCP 445, UPD 137, and UDP 138 are the common ports that are used by the printing process.
Bonjour
Bonjour is a protocol for Apple MacOS and other Apple devices. Bonjour allows you to discover Apple devices on your LAN. On Windows, if you install Apple iTunes you may also be using the Bonjour protocol.
AirPrint
AirPrint allows you to print from your Apple iOS devices (iPhone, iPad, etc.) to compatible printers.