Whether you want the pole to be removable or not will affect the height of the pole. A pole taller than about 10 feet will need to be reinforced unless it's too thick to be attractive, and this may make taking the pole down more difficult.
Use a heavy duty thick-walled PVC pipe at least two to three inches in diameter for taller flagpoles. You may have to buy a steel pipe for a ground sleeve to hold up the pole, a piece of reinforcing steel bar and several bags of concrete mix depending on the size of the pole and the hole in the ground.
The inside of the ground sleeve pipe needs to be only slightly wider than the outside diameter of the pipe you are going to use for the flagpole. There are flagpole suppliers that have ground sleeves available for standard PVC pipe suitable for flagpoles.
You'll need to find a top cap that will fit the pole, an eye bolt long enough to pass through the pole, a pulley, flag rope and a flag cleat.
Cut the PVC pipe to the height you want plus one to two feet to allow for the ground sleeve. Cut the ground sleeve three feet long, dig a two-foot-deep hole and put the sleeve in it.
Use a level to make sure it's vertical and pour concrete into the hole around it. Leave six inches to a foot sticking up out of the ground.
Drill a hole at the top for the eye bolt and bolt it in place. Bolt the flag cleat through the pipe about a foot from where it sticks up out of the ground.
Stiffening the Pole
Cap the pole and turn it so the open end is higher than what will be the top end of the flagpole. Support the pole so it doesn't bend in the middle.
Push a long piece of steel rebar down the pole so that it's at least 2/3 the length of the pole. Mix a thin batch of concrete mix so that it pours easily and pour it down inside the pole around the rebar.
Use a mix with small aggregate rocks or use mortar mix (which is cement and sand only) so that it pours the full length of the pole. Roll the pole as you pour to move the rebar away from the sides of the pipe.
Allow to harden and cure overnight. Attach the pulley to the eye bolt at the top and string the flag rope before erecting the pole.
Erecting the Pole
Loop three ropes around the top of the pole. Insert the bottom of the pole into the ground sleeve and while one helper steadies the pole, two others pull ropes from the opposite side to pull it up.
Once the pole gets high enough to let go, the third helper uses his rope to steady the pole from his side. This will keep it from over topping as it reaches vertical and slides down into the ground sleeve--job done.