How does a Lightsaber work? (Star Wars)

How does a Lightsaber work? (Star Wars)