Firefox on Android is using a feature available natively on Android from the very first version, to launch third party applications with an Intent that can be based on URI prefix, URI scheme or MIME types. These 3rd party apps are the ones defining the Intent they support.
Firefox calls a third party application an helper app. I have found references to this expression in several bug descriptions recently, such as:
https://bugzilla.mozilla.org/show_bug.cgi?id=959108 - Helper app opens different video on m.youtube.comHelper app opens different video on m.youtube.com
https://bugzilla.mozilla.org/show_bug.cgi?id=981483 - Helper app does not update or clear previous page actions
It should help you find the actual implementation, if you are interested.