The terminology comes from what’s known as the OSI networking model. PHY is short for “physical layer”, the protocol that actually drives and receives communication to and from the physical medium.
More here: https://www.educative.io/blog/osi-model-layers
A circuit or a block that implements the physical layer coding and decoding is often also called a PHY. In OSI working, this PHY in turn, connects to the layer above it. In Ethernet this layer is Media Access Control (MAC), and its interface is the Media Independent Interface (MII) in one of its variants (MII, RMII, RGMII, SGMII, etc.)
The OSI model is not only useful in understanding networking protocols like Ethernet, it can be applied to practically any interface. USB2 for example has its PHY and connects to its controller via UTMI+ or ULPI; PCI Express has the PIPE interface between its PHY and controller. Both interfaces can (and are) used to carry network information of some kind; with a proper networking stack the difference is transparent to the upper layers.