If you find yourself trapped in a hole in creative, you could build your way out, but flying is the best.
Step 1: Jump!
The first step to flying is to double tap the jump button. This will cause you to float in the air.
Step 2: Now to Go Up
The next step is to hold the jump button and slide and hold on either the top or bottom arrows.
Step 3: Almost There...
Keep on holding the up button and you will continue to go up.
Step 4: YAY!
You have done it! You know know how to fly in Minecraft PE!