Lucas Licensing maintains a continuity database, called The Holocron.
Quoting the Wikipedia article on Star Wars canon:
The Holocron is divided into five levels (in order of precedence): G-canon, T-canon, C-canon, S-canon, and N-canon.
G-canon is George Lucas canon: Considered absolute canon, it includes Episodes I–VI (the most recently released versions) and the upcoming Episodes VII–IX feature films, the animated film, and any statements by George Lucas (including unpublished production notes from him or his production department that are never seen by the public).
T-canon is Television canon:refers to the canon level comprising only the two television shows: Star Wars: The Clone Wars and Star Wars Rebels.
C-canon is Continuity canon: consisting of materials from the Expanded Universe including books, comics, and games bearing the label of Star Wars.
S-canon is Secondary canon: covering the same medium as C-canon, it is immediately superseded by anything in higher levels of canon in any place where two elements contradict each other.
N-canon is Non-canon: (...) anything else directly contradicted by higher canon ends up here. N-canon is the only level that is not considered official canon by Lucasfilm. Any published material that contradicts things established in G-canon and T-canon is considered N-canon.
However, after the acquisition by Disney, Star Wars canon was revised.
Disney and Lucasfilm established Lucasfilm Story Group, a committee whose job is to keep track of and define the "canon" in an effort to unify the films, comics, and other media with the existing canon.
The existing six films and The Clone Wars television series are considered G-canon (although it's no longer called that) while everything else is called Legends, which, as the name implies, aren't present in canon. For example, everything that happened in the expanded universe after Return of the Jedi was labelled Legends, and was replaced with the sequel trilogy.