How much detail do you want? Plugins are loadable code-chunks that share a public API. One of the most intuitive ways of achieving that is to create modules that expose one or more functions/methods with predefined names and signatures.
There was a question about this a few days ago where I also gave a very simple example.