Drupal 8 embedded with a plugin system. In drupal 8, Plugin is a group of PHP classes used for a defined specific usage. You can use any registered plugins, add new plugins and also create your own plugin type.
Create a new Plugin Type in Drupal 8
Example from Drupal 8 example module, Thank you.
See the Drupal 8 'Example' contrib module for full details and source
Module name : 'plugin_type_example'
Plugins are small pieces of functionality that are swappable. Plugins that perform similar functionality are of the same plugin type.
Link : https://www.drupal.org/developing/api/8/plugins