German Elections: Why did the Progressives fare badly and why did the AfD do so well?

Why the AfD has been so successful ?