Topline: Erdoğan will now become Turkey's longest serving prime minister as his Justice and Development Party (AK) achieves its third consecutive general election victory.

Foreign policy: From The Guardian,

The AKP will face a rocky third term. Analysts predict a dangerously overheating economy, and Turkey's "zero-problem" foreign policy is being challenged by regional uprisings such as that in neighbouring Syria, long an ally of AKP-ruled Turkey.

I would just point out that Turkey's "no problems" foreign policy has been challenged almost since its inception by politicians and pundits in the US and Europe. We will probably see even less attention given to EU accession now.

The challenge with regard to Syria is two-fold. First, Assad's government--which has recently been warming to Ankara--will likely turn cold toward Turkey (last week Erdoğan called the Syrian government's behavior toward protestors "savagery"). Second, Turkey now has a refugee problem on its hands akin to the one Syria was experiencing with Iraqi refugees. One difference is that these refugees could further destabilize things in the poor, Kurdish-populated south.

Turkey's domestic politics: I found it interesting that within hours of counting the votes, the AKP-favoring Turkish newspaper Today's Zaman was already remarking on the possibility of a new constitution, which Erdoğan promised on the campaign trail without getting into specifics. Here's the second paragraph of the Zaman article:

The AK Party won 49.9 percent of the vote, up 4 percent from the last elections, but this translates into 326 seats in Parliament, meaning it will be more than 40 seats short of the two-thirds majority needed to amend the country's constitution unilaterally and about four seats short of the 330 seats needed to refer a Constitutional reform to a public vote.

This is a higher percentage for the AKP than they got in 2007 (46.6 percent), which was considered a landslide at the time and likely gave Erdoğan and Davutoğlu the confidence they needed to start implementing their current policies, including "zero problems." It won't be hard to get the votes needed in parliament for the constitutional referendum, and that fact that the AKP can't amend the constitution entirely on its own doesn't strike me as particularly bad for the country's future.

For more detailed results and a basic visualization by region, see here.