How Do WordPress Plugins Work?

It seems like there is a plugin for just about everything you could possibly want to do with your WordPress website. This is a good thing. Plugins give your site utility beyond the standard functions of your chosen theme. This begs the question: How do WordPress...