A literary genre is a category of literary composition. Genres may be determined by literary technique, tone, content, or even (as in the case of fiction) length. They generally move from more abstract, encompassing classes, which are then further sub-divided into more concrete distinctions. The distinctions between genres and categories are flexible and loosely defined, and even the rules designating genres change over time and are fairly unstable.
Much of current classical literary genres starting with the ideologies of Aristotle as outlined in his famous treatises, Rhetoric and Poetics. In the treatise Rhetoric, Aristotle arranges rhetorical literary genres into three categories: the deliberative, forensic, and epideictic. He further categorizes genres of poetry in his treatise Poetics, where he also creates three different genre forms: the epic, tragedy, and comedy. Aristotle's ideas regarding literary genre were fine-tuned through the work of other scholars. 
Genres can all be in the form of prose or poetry. Additionally, a genre such as satire, allegory or pastoral might appear in any of the above, not only as a subgenre (see below), but as a mixture of genres. Finally, they are defined by the general cultural movement of the historical period in which they were composed.
Genre should not be confused with age categories, by which literature may be classified as either adult, young adult, or children's. They are also not the same as 'format', such as graphic novel or picture book sub-genre.
History of genres
Foundation of genre with Aristotle
Genre ideology began to truly develop with the ideologies and written works of Aristotle, who applied biological concepts to the classification of literary genres. These classifications are mainly discussed in his treatises Rhetoric and Poetics. In these treatises, he outlines rhetorical literary genres as well as prose and poetry genres. In Rhetoric, Aristotle introduces three new rhetorical literary genres: deliberative, forensic, and epideictic. He discusses the goals of the orators in what they hope to accomplish through the use of these rhetorical genres. 
In his treatise Poetics, Aristotle discusses three main prose/poetry genres: the epic, tragedy, and comedy. He discusses these genres as chief forms of imitative poetry, noting that they are representations and imitations of human emotions and characteristics. 
Other scholars' contributions
Genre was further developed by numerous literary critics and scholars. Notably, a scholar by the name of Northrop Frye published "Anatomy of Criticism," where he theorizes and verbalizes a system of genres. Through the system, he uses a set of rules to describe the constraints of each genre. In his piece, he defines methodological classifications of the genres of myth, legend, high mimetic genre, low mimetic genre, irony, the comic, and the tragic through the constitution of "the relation between the hero of the work and ourselves or the laws of nature." He also uses the juxtaposition of the "real" and the "ideal" to categorize the genres of romance (the ideal), irony (the real), comedy (transition from real to ideal), and tragedy (transition from ideal to real). Lastly, he divides genres by the audience they are intended for into: drama (performed works), lyric poetry (sung works), and epic poetry (recited works). 
Prior to Frye, there were a number of works written that helped shape literary genre. One of the works was by Cassius Longinus, a philosopher who wrote a treatise called "On the Sublime" which discussed the works of more than 50 literary writers and the methods they used to influence their audiences' emotions and feelings.
The idea of 'imaginative' genre, or genre that exists on factually untrue invented places, people, or things- writing about what does not exist- only started in the Romantic period. The reason for this shift is often attributed to the social events that were taking place in the Western world in terms of wars, infighting and overthrown leadership.  People felt the need for "escapism" to remove themselves from their respective situations. 
Literary works exist in various types, and genres categorize them based on specific shared conventions, as noted above. Genres are then further divided into subgenres. Literature is subdivided into the classic three forms of Ancient Greece, poetry, drama, and prose. Poetry may then be subdivided into the genres of lyric, epic, and dramatic. The lyric includes all the shorter forms of poetry, e.g., song, ode, ballad, elegy, sonnet. Dramatic poetry might include comedy, tragedy, melodrama, and mixtures like tragicomedy.
The standard division of drama into tragedy and comedy derives from Greek drama. This division into subgenres can continue: comedy has its own subgenres, including, for example, comedy of manners, sentimental comedy, burlesque comedy, and satirical comedy, and so on.
Often, the criteria used to divide up works into genres are not consistent, and can be subjects of debate, change and challenge by both authors and critics. However, some basic distinctions can be almost unanimous. For example, a common loose genre like fiction ("literature created from the imagination, not presented as fact, though it may be based on a true story or situation") is well known to not be universally applicable to all fictitious literature, but instead is typically restricted to the use for novel, short story, and novella, but not fables, and is also usually a prose text.
Semi-fiction or spans stories include a substantial amount of non-fiction. It may be the retelling of a true story with only the names changed. It can also work reciprocally, where fictional events are presented with a semi-fictional character, such as Jerry Seinfeld.
Modern genre theory
The origins of modern genre theory is linked back to the European Romantic movement in the late eighteenth and early nineteenth centuries, where the concept of genre was scrutinized heavily. The idea that it was possible to ignore genre constraints, and the idea that each literary work was a "genre unto itself" gained popularity. Genre definitions were thought to be "primitive and childish." From that point until the twenty-first century, modern genre theory often sought to dispense of the conventions that have marked the categorization of genres for centuries. However, the twenty-first century has brought a new era in which genre has lost much of the negative connotations associating it with loss of individuality or excess conformity.
- Todorov, Tzvetan; Howard, Richard (1976). "The Fantastic: A Structural Approach to a Literary Genre". The Slavic and East European Journal. 20 (2): 186–189. doi:10.2307/305826. JSTOR 305826. Retrieved 2021-04-17 – via JSTOR.
- Pavel, Thomas (2003). "Literary Genres as Norms and Good Habits". New Literary History. The Johns Hopkins University Press. 34 (2): 201–210. doi:10.1353/nlh.2003.0021. JSTOR 20057776. S2CID 144429849. Retrieved 2021-04-17 – via JSTOR.
- Collins, James (2015). Exhortations to Philosophy: The Protreptics of Plato, Isocrates, and Aristotle. Oxford University Press. ISBN 9780199358595.
- Corrigan, Philip (July 1, 1986). "Book Review: Literary Theory: An Introduction". Insurgent Sociologist. 13 (4): 75–77. doi:10.1177/089692058601300410. S2CID 144848160. Archived from the original on April 28, 2021. Retrieved April 17, 2021.
- Neto, Bill (April 16, 2021). "Literary Genres". eBooks Discounts. Archived from the original on April 17, 2021. Retrieved April 17, 2020.
- Fishelov, David (1999). "The Birth of a genre". European Journal of English Studies. 3 (1): 51–63. doi:10.1080/13825579908574429. ISSN 1382-5577. Archived from the original on 2021-04-28. Retrieved 2021-04-17.
- Wagner, Christian (2005). "G. M. Sifakis: Aristotle on the function of tragic poetry". Gnomon. 77 (4): 294–299. doi:10.17104/0017-1417_2005_4_294. ISSN 0017-1417. Archived from the original on 2021-04-28. Retrieved 2021-04-17.
- Weinberg, Bernard (February 1950). "Translations and Commentaries of Longinus, "On the Sublime", to 1600: A Bibliography". Modern Philology. 47 (3): 145–151. doi:10.1086/388836. ISSN 0026-8232. S2CID 161109504. Archived from the original on 2021-04-28. Retrieved 2020-12-02.
- "Genres". Archived from the original on June 16, 2011. Retrieved April 17, 2021.
- Duff, David (2000). Modern Genre Theory. London: Routledge. doi:10.4324/9781315839257. ISBN 9781315839257. Archived from the original on 2021-04-28. Retrieved 2021-04-17.CS1 maint: date and year (link)