Explain how a PLC and HMI would communicate
It depends on the make and model of both devices. But currently, the common protocols are ethernet and Profibus. Profinet is a protocol on Ethernet. Siemens does not use the Profinet protocol for HMI communication. They use a subset of the S7 protocol called OP whether it is over Ethernet or Profibus.
The HMI unit, depending upon which model you select, will communicate with the PLC using serial communications or by way of an Ethernet connection. HMIs are programmed using free software and via a serial port (USB, or standard DB9 port) available from the vendor