there are several different forms of presenting this; each has a very specific format. plays have a very simple format; teleplays, for television shows, or screenplays, for movies, have more complex and strict rules for formatting.
drama
the first of these to be written for the express purpose of being performed were created by the greeks. many of our modern terms derive from greek origins.
comedy
in the greek sense, a play that doesn't end in death. in modern usage, refers to a play that is humorous.
tragedy
in the greek sense, a play that ends with the death of at least one of the main characters. in modern usage, refers to a play that doesn't have a happy ending.