Plugins extend the functionality of MQ2, usually at a lower level than macros do. For example, a macro may help you do automatically mez mobs within a certain range, or auto-attack mob within a certain range. A plugin may control lower level functions like casting the mez spell for you (ie. making sure you have the right target, auto-recasting if you fizzle, etc) or control movement to your intended victim and activating attack (ie. moving you to melee range, turning on attack, automatically backstabbing, turning off attack on enrage, etc).
The functionality of plugins and macros often overlap, and in the above example its completely possible to do all the above using just a macro with no plugins.
Plugins are written in C++ whereas macros use MQ2's internal scripting language. The internal scripting language is a lot easier to use and manipulate than C++, which is why you'll find a lot more macros than plugins on the MQ2 message boards.
Because call UnloadMQ2Plugin(name) from within a plugin will crash, you must use a macro command to unload the plugin. DoCommand(NULL, "/timed 20 /plugin unload"); will queue the macro command to unload after two seconds.