Why Isn't My MagSafe Adapter Working?
If you think there is a problem with your MagSafe adapter, one possible way to isolate the problem is to borrow a compatible adapter from a friend and see if his works. If your MagSafe has failed, there are a few common culprits. First, if any liquids have been spilled on the MagSafe it may fail. Or, if the cord is frayed or worn at any point (especially near the ends) the cord may fail.
If the MagSafe appears to be in good physical condition, make an appointment at an Apple Store Genius Bar. MagSafe Power Adapters less than one year will generally be replaced for free as long as the Genius doesn't think there was any user generated damage. Sometimes, even if your MagSafe is out of warranty (but not too old), a Genius may replace it for free. This will definitely not happen unless the power adapter appears to be in perfect physical condition.