While some novels may be based on real events or people, the core of a novel is a narrative created by the author's imagination. This sets it apart from non-fiction, which aims to present factual information.
There are, of course, exceptions like historical fiction, which uses real historical events as a backdrop for a fictional story. But even in these cases, the events are shaped by the author's creative interpretation and the characters are not real people.