When we talk about canon in fiction, we mean the official rules about what is true and what is not true in a story. Imagine you're playing a game with your friends and you all agree on certain rules, like how many points you get for hitting the ball with your racket. That's like canon in a story. It's the agreed-upon rules that everyone agrees to follow so the story makes sense and is consistent.
In a book or a movie, there are certain facts and events that happen that are considered "canon." That means they are official and part of the story. For example, in Harry Potter, it is canon that Harry is an orphan who learns he is a wizard and attends Hogwarts School of Witchcraft and Wizardry. Those are things that happen in the story and are accepted as true.
However, sometimes there are things that happen in a story that aren't part of the official canon. These are often called "non-canon" or "alternate universe" stories. They might explore what would happen if a certain event didn't occur or if a character made a different choice. These stories are not part of the official canon and are not considered to be part of the "real" story.
In summary, canon in fiction is like the agreed-upon rules that everyone follows in a story to make sure it makes sense and is consistent. It's what we consider to be the "official" story, while non-canon or alternate universe stories are not part of the official canon.