Let me give you the Cliffnotes version.
Turkey has a long history with its army. Starting with Rebellions by young officers in the army against the Ottomans, led bu Mustafa Kemal Ataturk, the army has viewed itself as the defender of Atatürk's Turkey.
Fast forward after Atatürk's death, and the army does a coup every decade or so to keep the country on the track it likes and remain some modicum of power. The latest one was 1997, when they never took charge, but forced the Islamist government to resign and forced the disbandment of an Islamist political party that Erdogan was a part of.
2002, Erdogan is elected prime minister for the Islamist AKP. He immediately takes steps to purge the military, culminating in the Ergenekon case which saw the arrest of hundreds of top military officials.
Later we saw the Sledgehammer (?) cases which imprisoned scores of secular politicians.
Most recently, we have seen the exposure of a corruption scandal revolving around his administration immediately followed up by a purging of the police force and judiciary. This was December 2014, I think? Much of the civil service was filled by Gulenists - people who follow the a preacher who is in exile in the US. He runs a system of religious schools in Turkey and was a former ally of Erdogan back in 2002. They had a falling out and became opponents, and Erdogan has been blaming everything going wrong in Turkey on them.
While all this is going on, Erdogan is slowly destroying the freedom of the press via lawsuits, secret police raids and forced takeovers of newspapers. The last main opposition paper was coerced into a pro-government paper sometime this year
Finally, with his party failing to win the elections last year and refusing to form a coalition, Erdogan provokes and renews the fight against the Kurds to gain popularity. He calls snap elections and surprise surprise, wins a majority. One of his first actions? Wanting to start the process of transitioning from a parliamentary system to a presidential system. As President, his role is largely ceremonial, but he bullied his Prime Minister around so much that he was forced to resign. Think of Medvedev with Putin, but with less power.
Basically, he is a corrupt, ruthless, Islamist ruler who is bent on destroying the secular systems in place in Turkey, and is willing to destabilize the entire region in order to cement his position on top, and Turkey's position as the leader of the region.
As Bo said...about fuckin time