On the PHP side the admin class attaches the action to every suitable list view. On the JavaScript side a class extends AbstractListToolbarAction and describes with getToolbarItemConfig() what the button looks like and does. A security context belongs to it, which the server checks for each entry.
Glossary Term
Toolbar action
An entry in the bar above a list. It consists of a PHP part and a JavaScript class with the same key.