Shift the box on the top screen to the left of Box 1 to get to the Transport Box. From there you can move the Pokémon one by one to your Sun or Moon game. Press X to save and your Pokémon will be transferred.