The key is when you bought it. Apple will replace it if it is within the first year. If you bought Apple Care before the first year passed, they will take care of you for two years. Otherwise, you will have to pay to have it repaired, either by Apple or a third party.