Star Wars novels are not canon, and George Lucas has contradicted them with the prequels.
This is technically a 100% true statement, but needs clarification (see below).
~Although Lucas did use many of Timothy Zahn's concepts and ideas in the prequels and snuck some into the remastered original trilogy, when Zahn's Thrawn Trilogy was being released I recall Lucas giving them canonicity, but I'm wrong about that... Ooopsy doodle !!
Ooopsy. Lucas did
not use "many" of Timothy Zahn's concepts and ideas in the prequels or remastered classic trilogy. He used the name of the capitol planet, Coruscant. That's it. Zahn is one of the most notoriously movie canon-contradicting authors, but that is partially because his initial trilogy of novels were early in the efforts to maintain continuity in the EU. In Zahn's continuity, the Clone Wars ended around 16 years before Luke and Leia were born. The Republic's
enemy in the wars were clonemasters who had the clone armies, the clones were insane, and cloning technology worked very differently. Palpatine had a personal Jedi advisor. Just to name a few discrepencies.
Here's the difference between Star Wars canon and Star Trek Canon.
Star Trek canon is everything on-screen. If it's in a book or a video game, it's not canon, and Paramount makes it clear that any of that material could be contradicted in the future.
Star Wars canon is everything on-screen plus pretty much everything else that's licenced. I've seen everything from the EU novels to the back of toy boxes be used to argue things in the SW universe. However, Lucas has no issue overriding Star Wars canon outside the movies.
Basically, SW material outside of what is on-screen is handled in exactly the same manner by Lucas as ST material outside of what is on-screen is handled by Paramount, but they label EU SW material canon anyway.
Regarding Star Wars canon, this is not true. Lucas originally modelled Star Wars continuity concerns on Trek canon (except demoting TV canon), but Star Wars canon has become immensly more complex. Star Wars canon has multiple levels or tiers, as opposed to Trek's simple
TV series + movies vs.
everything else.
The highest tier of SW canon is film canon, which is a mere 6 films. When just using the term "canon," without specifying the level and if it is not clear by context then by default you are referring to the highest tier of
films only. Yes, George Lucas owns Star Wars and thus his highest tier of films-only is often referred to as "G-canon".
Underneath the film canon is the EU canon, which is most (but not all) of the TV series, novels, comic books, games, etc. These stories are
supposed to not contradict films or itself (although they often still do both). Since the EU was going strong before the prequels, some things in the EU had to be retconned to conform to the higher-tiered prequel films (but not nearly enough IMO).
Star Wars has some "what if?" stories. Those
stories as well as some early EU (like parts of the 70s-80s Marvel comic book) are declared as non-canon. Sometimes aspects of these non-canon stories are used in the modern EU which then elevates those aspects only to EU canon.
In recent years, a new level of canon has been inserted into the canon tier structure. "TV Canon" does not mean all TV series, but refers specifically to the previous and current
Clone Wars series, as well as the future live-action TV series. Like everything else, this tier was of course placed below the film canon, but this level is
above the EU canon, which gives it the creative freedom to contradict previous EU stories (which would then require a retcon to the EU to conform to the modern TV canon).