We've talked about Activator before, the cool app that lets you add new functionality to your jailbroken iPhone's buttons (like opening the camera by hitting the home button three times). It just updated to include the ability to launch any app when you plug in your headphones.
There have been other apps that did this on jailbroken iPhones, but now it's built right into Activator. And, since most of you probably already have Activator anyway (whether you're using it for your own gestures or whether it's required by another app), you can just head to the Settings app and turn this feature on for yourself, no extra apps required. You can set it to perform any action when you connect, disconnect, or press a button on your headset, which is great for giving you a bit more control over your music.
Activator is a free download and is available in Cydia for all jailbroken iOS devices.