Modern-day Instanbul has a history that reaches back millennia. Thought to have been originally founded as a trade settlement by Thracian tribes, it was eventually settled by the Greeks in roughly 300 BCE. However, during the era of the late Roman Empire, it was chosen as the site of Nova Roma, the new capital built by Constantine. More commonly, however, it was known by many names, most commonly as Constantinople, or the "City of Constantine." For over a millennia afterwards, it remained as the richest, largest, and most advanced city of Europe, and its fall to the Ottoman Empire dramatically affected the course of the world.
The city was protected by a series of defenses that protected the entire peninsula, conveniently locking out anyone the citizens didn't want--mostly "barbarian" immigrants. The city also benefited from the affluent trade routes between Anatolia (modern Turkey) and Greece, which served as the link between east and west and was a critical stopping point of the silk road and other valuable trade routes from the east. This wealth made life in the city cozy, to say the least, and soon turned it into a continental epicenter of learning and influence. Of course, as a result, everybody wanted to take the city--and many tried.
At one point, the city was reinforced with a new set of fortifications, the Theodosian Walls, which successfully guarded the city against repeated sieges. Even Attila the Hun turned around and decided the city was impregnable, which wasn't a common approach of his. Three layers of walls and a deep moat successfully protected the city against Huns, Sassanids, Arabs, Bulgars, and Crusaders alike. Needless to say, the city earned a bit of a reputation as impregnable.
One of the more famous defenses of the city was the closely-guarded secrets of Greek Fire, which allowed their dominance of the sea and created actual flamethrowers for the land defenses and sea walls alike. Pots would be filled with the flammable liquid that burnt on water and land alike, although some accounts claim siphons would propel the liquid from tubes like a modern flamethrower. Things heated up quickly when it was brought into battle.
All of that said, nothing lasts forever. The fourth crusade ended as the Venetians used the crusaders to take advantage of Byzantine politics and sack the city during a coup attempt on the emperor, leaving the city and remnants of the empire crippled. Eventually, the Ottoman Turks grew powerful enough to successfully topple what was left of the Byzantine Empire in 1453. The advent of canons allowed a bombardment of firepower that, after weeks of siege, reduced the walls to rubble. Even then, the defenders mounted valiant defenses that held the Turks off, but the defensive lines finally failed. The last Byzantine/Roman Emperor, Constantine XI, died in the gap.
Afterwards, Constantinople was renamed Istanbul and served as the new capital of the Ottoman Empire. The ever-helpful Venetians fought them for control of Greece on multiple occasions, even managing to blow up most of the Parthenon in Athens in the process, but the Ottomans were there to stay. Istanbul remained a major economic and cultural center, but, ironically, it's change of hands also spelled its decline. The Byzantines had controlled the silk road for years thanks to the location; after the fourth crusade, the Venetians had largely controlled the trade through the Byzantines. However, after the success of the Ottomans, the rising Spanish and Portuguese kingdoms decided to circumvent the Ottoman dominance of the road by finding a sea route around Africa--and then inadvertently finding the Americas. In a way, although the Ottomans remained a major power for at least a century longer, and Istanbul remains an important city to this day, the last Roman defenders had the last laugh over the Ottomans and Venetians alike.