One of Solr’s strengths is providing a rich platform of functionality with the option of adding your own custom components running within Solr.
Solr calls such components plugins when the implementation is configurable. Surely you have seen many already throughout Solr’s configuration via the "class" reference. Common examples are Request Handlers, Search Components, and Query Parsers to process your searches, and Token Filters for processing text.
Most apps don’t need to create plugins because Solr offers a rich set of them built-in. However if you do, start by looking at the code for existing similar plugins. Writing your own is an advanced subject that is out of scope of the reference guide. One resource is the Solr Wiki documentation on plugins at SolrPlugins, which is rather out-of-date but has some utility.
There are essentially two types of plugins in Solr:
Collection level plugins. These are registered on individual collections, either by hand-editing the
solrconfig.xmlor schema files for the collection’s configset or by using the Config API or Schema API. Examples of these are query parsers, request handlers, update request processors, value source parsers, response writers etc.
Cluster level (or Core Container level) plugins. These are plugins that are installed at a cluster level and every Solr node has one instance each of these plugins. Examples of these are Configuring Authentication and Authorization, metrics reporters, cluster level request handlers, etc.