Getting Started with WordPress Plugin Development: The Ultimate Guide

Plugins are PHP scripts that alter your website – basically, bits (or even lots!) of code that can be uploaded to your WordPress install to extend and expand the functionality of your site, without having to hack the core code. The great thing about plugins is that they allow you to add features to your site and remain intact, even if you switch themes or upgrade your WordPress install.

Source: Getting Started with WordPress Plugin Development: The Ultimate Guide