Metafiction is an elastic concept covering a wide range of fiction but in essence boils down to stories in which the book blurs the line between reality and fiction by drawing attention to itself in some shape or form. To boil it down even further, you could say that it is fiction about fiction.
William H. Gass is attributed with establishing the term metafiction in a 1970 essay titled "Philosophy and the Form of Fiction". Commenting on American fiction of the 1960s, he pointed out that a new description was needed for the emerging genre of experimental texts that openly broke with the tradition of literary realism still dominant in post-WWII American literature.