Magic.

THIS VIDEO CONTAINS SPOILERS.

Here's an awesome VFX breakdown that shows how all the wizards at Lucasfilm used CGI to elevate The Force Awakens. It's a truly great watch.