For example, media://com_foobar/css/test.css is parsed into
media/com_foobar/css/test.css if no override is found, or
templates/mytemplate/media/com_foobar/css/test.css if the current
template is called mytemplate and there's a media override for it.
Regarding plugins, templates are searched inside the plugin's tmpl directory and the template's html directory.
For instance considering plugin://system/example/something the files will be looked for in:
plugins/system/example/tmpl/something.php
templates/yourTemplate/html/plg_system_example/something.php
Template paths for plugins are uncommon and not standard Joomla! practice. They make sense when you are
implementing features of your component as plugins and they need to provide HTML output, e.g. some of the
integration plugins we use in Akeeba Subscriptions.
The valid protocols are:
media:// The media directory or a media override
plugin:// Given as plugin://pluginType/pluginName/template, e.g. plugin://system/example/something
admin:// Path relative to administrator directory (no overrides)
site:// Path relative to site's root (no overrides)