If you are a singleplayer, the command is /grant singleplayer fly and this will grant you the flying privilege. Other wise, the command is /grant {whatever your character name is} fly for a server game. Your could also do the /giveme default:pick_wood command to give you a wooden pickaxe to tunnel some steps to the surface of the hole.

EDIT: {A change in one words choice.} And x, y, z means your coordinates on the map. The y coordinate is the up and down position while x and z are the left/right and forward/backward position depending on which way you are looking. The 0, 10, 0 coordinates means the center of the map and 10 blocks up in the sky. At least hopefully in the sky and not inside a mountain. :)