"Theater" is a rather hard term to pin down. All the permutations and technicalities of what we call theater can only broadly be described, but "live theater" is the thing that most readily jumps to mind. Live performance is inextricably entwined with the art form; virtually everyone has memories of sitting as part of an audience and enjoying a live play.
Historically, the first live plays were performed in Greece. The format was quite different from what we recognize as theater today, with one actor, called "the protagonist" supported by a chorus of those helping him to tell the story. This format evolved to include an "antagonist" through the vision of one of the first playwrights, Aeschylus. Plays became very popular in Greece and spread all across the nation.
Later, in Medieval times, the theater was heavily influenced by religion, with many plays containing themes relating to Christ and Christianity in particular. Comic themes emerged in otherwise quite serious plays, serving to teach Christian values. Religious plays typically featured simple "good triumphs, evil cast down" structures. There were some secular plays done as well, with what is now termed a "farce" (containing highly humorous backdrops) being the most popular. Plays of this sort were typically performed by actors from noble Medieval houses.
In the 18th century, Italian theater came as a response to military strife. Comedies were most successful during this period as a reaction to troubling times. Playwright Carlo Goldini helmed this new resurgence of the art form, writing over one hundred and fifty plays. More serious plays were also penned by playwrights such as Scipione Maffei, who wrote tragedies with great passion and sorrow.
In England, circa 1599, the Globe Theater was established, from which many burgeoning new playwrights rose. Chiefly remembered of these was the great William Shakespeare. Plays had evolved from mainly religious settings by this time to include more dramas and comedies, areas in which Shakespeare excelled far beyond his peers. He was made famous for witty dialogue, engaging characters and a unique perspective, exploring humanity and its downfalls.
American theater arose in the 17th century. From the start, plays were mainly melodramas, although they evolved first to include supernatural elements and later became more gentile melodramas. In the 19th century, after American independence, the first permanent playhouses were built, building off of growing theatre popularity. In 1847, the first "Broadway Theatre" was built, which eventually became the center of American Theatre.
Live theatre has had a long and arduous path to become what it is today. The history of live plays and theatre is rich, varied, and is well worth the effort to study and learn from.