Great definition - let's put it in layman's terms. A piece of metafiction is written with the intent of making the reader aware he is reading fiction.
And it doesn't matter if your story is realist or surrealist or magical realist or if it takes place 300 years from now or in an alternate reality dimension of the Great Depression. Your job is to write in a way that makes it easy for the reader to believe it's all real.
Except when you don't.
Writing metafiction, or fiction that "alludes to its artificiality," can be done through a variety of devices. As with most literary devices, it's easier to understand these with examples – and children's literature has plenty.
One common metafictional device is narrative footnotes which comment on or add to the story. When done poorly, these footnotes can distract from the story and break the contract. When done effectively, you end up with works like An Abundance of Katherines, by John Green.
Book about itself
A book that is mentioned in itself, that even plays a vital role in the story it tells, is an example of metafiction, which Cornelia Funke did with her Inkheart series.
Book within a book
Book about a book
Likewise, reading about a character reading a book doesn't seem all too interesting. But Michael Ende pulled it off nicely in The Neverending Story. ATREYUUUU!
Story about a story
Which sounds a whole lot like the previous device, and is. (Really, many of these examples use more than one metafictional device.) In this case, I'm referring to a story about one event unfolding – even being "written" – within the main story. Taylor in Jellicoe Road by Melina Marchetta knows what I'm talking about.
No matter which person we choose to write in, our job as writers is to give voice to the narrator(s) of our story. This is even more challenging when the narrator "reveals himself" as the author, as Daniel Handler kindly lets Lemony Snicket do in A Series of Unfortunate Events.
Characters who know they're characters
Most often used in parodies, another metafictional device is to present a story in which the characters are aware that it is, in fact, a story. Like Henry Potty and his poor friends in Valerie Frankel's series.