What is the correct word, plugin or plug-in? Does it depend on the context?
As others have mentioned, most dictionaries (including the OED) list plug-in as appropriate. I'd seriously shy away from calling plugin incorrect—I mean, just look how many hits you can get with Firefox and plugin. In my experience, especially with computer programs and on the Internet, plugin is much more common than plug-in. Taking a descriptivist standpoint, I'd put my weight behind plugin.
The correct word is plug-in.
Every dictionary I can find plus wikipedia all state the word being "plug-in" while a few do mention they are sometimes called "plugins", that just seems to be in incorrect usage.
I would post more links but my rep will not allow me.
And if you also want to know the act of plugging something in it would be "I am going to plug in the lamp."
I'm sure "plugin" is the wave of the future (like "email"). I'm a tech writer and I'm trying to decide which spelling to use in documentation. My copy of the "Microsoft Manual of Style" has "plug-in" with a hyphen but it's a bit out of date (10 years old, to be precise). I'll probably go with "plugin" since that's the way our developers spell it.