The Apple 3.5mm headphone jack may have multiple different failure modes, since it contains 4 equally flimsy electrical contacts. Staring into the glowing red Cylon eye, they are: 2 "sleeve" contacts (nearest you), one at 9 o'clock and one at 3 o'clock (positions on an imaginary 12-hour analog clock dial); 1 "ring" contact (farther in) at 12 o'clock; and 1 "tip" contact (all the way in) also at 3 o'clock.
The one plaguing my Late 2006 MacBook is the tip contact. Tugging on it with a bent-tipped safety pin while watching through a magnifying glass works, but only until the next time I unplug the headphones, and so is too impractical. Jostling it with things like air, suction, Q-Tips, toothpicks, ballpoint pen inserts works for some, but not for me. What works for me 100% of the time is inserting a 1/8" metal rod all the way and then dragging it out while applying moderate pressure in the 9 o'clock direction (towards the MagSafe connector). There is no problem using metal, even powered on, because headphone circuitry supplies no power and is protected against short circuits and static electricity. Just be gentle.
The shank end of a 1/8" drill bit works well, and burying the business end in a bottle cork prevents it from cutting you (it is sharp). But I settled on a piece of nail, snipped down to an inch and filed slightly rounded. As a bonus, it fits into the little plastic clip on the MagSafe cable so it is always handy.