Metafiction is a subgenre of fiction. It´ s name derives from greek word "μετά " which can be translated as "beyond" or "behind".
"Metafiction is known for directly addressing the reader and questioning the story that the narrator is telling. This characteristic is also known as “breaking the fourth wall". " (Yen Cabag , tckpublishing)
The purpose of this is to break conventions, push the limits of fiction and to pull the reader deeper into the story and give him more unconventional reading experience or to parody something.
One of the earliest examples of metafiction are The Cantebury Tales by Geoffrey Chaucer. Chaucer often turns to his readers in this book and sometimes even apologizes to them.
Another well known example would be Don Quixote by Miguel de Cervantes.
Other examples of metafiction in literature
The Neverending Story - Michael Ende
The Handmaid´s Tale - Margaret Atwood
The Hitchhiker´s Guide to the Galaxy - Douglas Adams
Kafka on the Shore - Haruki Murakami
Source
"Metafiction: Definition and Examples" tck publishing, Oct.9, 2023 https://www.tckpublishing.com/metafiction/
Michaela Kůřilová Zajíčková