We booked with Turkish Airlines a flight from Valencia (Spain) to JFK airport (New York) knowing that we would have to stay in Istanbul (Atatürk) for over 12 hours.
What are we entitled to for this 12 hour stay?
Anybody travelling with Turkish Airlines can get a free tour of the city, including lunch and sometimes breakfast. Turkish Airlines can't arrange a visa for you, you must have the right to enter Turkey. Because the tours have fixed departure times, this will only work if you arrive in the morning in Istanbul.
If no earlier connection was available, you can also avail yourself of a complimentary hotel room.
You cannot use both these services during the same layover. If your connection is eligible for both, you have to choose between the tour and the hotel room.
See also the FAQ about city tours.