I want to make wooden puzzles out of Star Wars characters and sell them on Etsy. Would this be considered a violation of copyright? They would not be explicitly stated as Star Wars puzzles but I would use character names like "Darth Vader" and such to identify them. How do companies like LEGO do it?
I hate to crush your dreams :( but you will be required to pay licensing fees. These fees, which are usually undisclosed to the public, are one of the milking cows of a successful franchise and are usually high in price. With a more popular company, like Star Wars owned by Lucasfilms, you can expect a large denomination of fees because of your expected return on a 'commonly known' name. Another thing to keep in mind, Lucasfilms does not hand these out to whomever 'has enough money', and they will require a pitch of ideas.
If you instead decide to make a knockoff using closely related names like Darth Sader, then I would advise you to reconsider and take a look at the many, many, many lawsuits brought on from Apple to companies who make knockoffs. Though, obviously, Apple is not Lucasfilms, the same copyright infringement suit could be brought onto you, especially if the idea creates a lot of financial success.
You are seeking to create something and sell it, using branding from a major movie franchise. Lucasfilm is seeking to both profit from its Star Wars property, and protect it by being selective as to who or what can use the Star Wars name and concepts. Lucasfilm can set up as many hurdles as they want in order to protect, profit from, and control who uses their Star Wars name and concepts.