In both cases, the engines work by shooting negatively-charged ions out the back at extremely high velocities. In Star Wars, this idea works really well; in reality, this is really slow because you're moving by throwing out single atoms.