What is a plugin in WordPress?
Straight fromt he official docs:
WordPress Plugins are PHP scripts that extend the functionality of WordPress . They enhance the features of WordPress, or add entirely new features to your site. Plugins are often developed by volunteers, and are usually free to the public. Plugins are available via the WordPress Plugin Directory.