What's the difference between a tragedy, a history, a romance and a comedy?
The four genres you have listed are the various types of plays that existed during the Renaissance. We can look at Shakespeare to help identify the elements that distinguish the four types from one another.
Tragedy and Comedy are the ancient dramatic genres. They can be found in the writings of the ancient Greeks like Sophocles or Aristotle. They were thought to be the two sides of human existence and displayed the full range of human emotions. The dichotomy between tragedy and comedy is why drama is represented by the two masks: one laughing and one crying.
Tragedy has a few elements that are distinct from the other genres; typically, there is a serious storyline that involves intrigue—murder, suicide, patricide, adultery, and the seven deadly sins. There generally is a tragic hero: a hero that is marked by some flaw or hamartia that brings them down. The ending of the play gives a clear indication if it is a tragedy: it is a tragedy if the main character(s) die (and this is usually one of several deaths). An example of tragedy is Romeo and Juliet; it ends in the deaths of the main characters and several others.
Comedy is the opposite in many ways. It generally has plot elements that are meant to be funny, like a mistaken identity or the use of fantastic features like faeries. Comedies can also be identified by their ending: when every problem in the play is resolved and a wedding takes place. For example, Twelfth Night tells the story of a pair of fraternal twins who end up switching identities, and it ends in a double wedding.
History plays generally do what their name implies; they tell the story of a historical event in a dramatic format. An example would be Richard III, which tells the story of King Richard III of England and (mostly) sticks to the historical details, although the context of politics (of the author and of the audience) plays a crucial role when these stories are told.
A Shakespearean romance wasn't a classification used until after Shakespeare's death. This genre didn't exist during the Renaissance, but it generally describes a "tragi-comedy" or a play that splits the boundaries between tragedy and comedy. It doesn't feature much in the way of death, but it comes very close. However, Shakespearian romances have a happy ending, despite being serious in tone and subject matter. An example of this genre would be The Tempest, where there is serious intrigue—near-murder, and plots of revenge—yet it has a happy ending where the main characters learn something and grow.