Movies were the only Star Wars thing up to beginning of nineties. Since then there have been more than 200 novels/novellas in addition to a lot of comics and a TV show, all of which were cannon, and elements from which were added to the new movies (the rule of two, Coruscant etc). Then after Disney bought Lucasfilm they decided to decannonize everything bar the movies and the Clone Wars TV show, with some games like TOR being officially supported, other people not being able to add stories on that timeline, but at the same time not categorized as canon. Then since 2014, everything that has been written officially is in the same level of cannon as the movies and TV shows. It needs to be said that a lot of stuff from the old cannon has been added into the new one (like Thrawn).
So now, there are the eight movies, the two TV shows, and 10-15 books which are categorized as cannon.
...
Lucas definitely didn't plan the trilogy from the beginning, and originally Star Wars was supposed to be a standalone, with the possibility of sequels (which is why Vader didn't die there). However, a lot of stuff was added later. The Emperor wasn't supposed to be force sensitive, Vader wasn't supposed to be Anakin Skywalker and Luke and Leia weren't siblings in the beginning.