How work the icon in the panel?

Hello,
If an application display an icon in the panel, near the clock and if this icon is missing in the icon package of the theme used, how the system find the icon in the panel to display it? For example, the application XYZ will display an icon in the panel, but the user use an icon theme downloaded from gnome look, and in this icon theme, there is no icon for the application XYZ. How the system find and display an icon in the panel for this application XYZ?

AFAIK an application installs and registers its own icons in theme-agnostic manner.