here is a great website on building noise cancelling headphones http://headwize.com/?page_id=684
The concept behind noise cancelling headphones is simple. You listen to the environment and then play it back 180 degrees out of phase. When the original wave and the shifted wave meet, they cancel eachother out

The circuit is pretty simple. You have microphone go into an inverting amplifier, then you play it through the speaker (simplified version) This achieves noise cancellation.
edit
one major benefit of this solution is it is purely implemented in (analog) circuits. It doesn't require adaptive filtering, a decision engine, or any computing power. This type of circuit is what most commercial products use: Active filtering
Sometimes the solution to the problem isn't what we expected. We can get into signal estimation, adaptive filtering, DSP boards or MCUs, or any number of complex mathematically rigorous constructs but really, all that's needed is an inverting amplifier. If you want a software solution please state so (and in that even we can go back to signal estimation and adaptive filters) but since you asked for practical solutions to actually convert regular headphones I have presented a hardware implementation.
edit2
unfortunately the original website seems to have vanished, but here is the same exact content in a PDF I include the full article because it has parts lists, some helpful troubleshooting tips, and far more detail than I've included. And in case the new link breaks here is the main circuit with a brief explanation from pdf. The circuit itself looks complex but its really a 3 stage amplifier but one for each audio channel (left and right) so 6 amps total. As you can see the second stage is the inverting amp (makes signal 180 degrees out of phase) achieve our noise cancellation.
The following material is an excerpt from the noise cancellation headphone guide written by Jules Ryckebusch and all credit goes to Jules for design and explanation.
