I was trying to figure out how to do this for a very long time when I finally figured it out by piecing together different pieces of information I found in many different instructions. This helped me a lot and I hope it helps you with all of your speaker projects!
You Will Need:
A speaker (I got mine by taking apart an old computer speaker)
A pair of iPod earbud thingies you don't want back
A soldering iron or a bunch of electrical tape (I used the electrical tape but soldering would probably be preferable)
A wire stripper (you can use scissors for this if you don't have one).
Step 1: The Earbuds
Take your earbuds and cut the wire right below where they split, so you have a plain cord with a jack on the end and a split cord with the earbuds on it. Take the plain cord with the jack and strip about an inch of the insulation off the end without the jack. There will be four separate wires, a copper, a red, a green, and a red and green striped one. Burn off the colored insulation on these wires by setting them on fire individually using a small lighter or match. The flame should catch, burn off the insulation, and burn out quickly. Do this to each of the wires, making sure you can identify their original colors still (leave a bit of the color at the base so you can tell). Set this aside and grab your speaker.