We retire flags to give them the respect they deserve. If a flag is flown in improper condition, it is seen as disrespectful according to the United States Flag Code
When a flag is unfit for display, it must be taken down and replaced. Reasons a flag might be unfit for display include large rips and tears, faded colors, being excessively soiled, weather damaged, etc.
There isnt a single "right way" to retire a flag. The most important thing is to be as respectful as possible.
According to the U.S. Flag Code, and flag should be retired in a respectful manner, preferably by burning. This works well for flags made of natural materials (cotton, wool, linen, silk, etc.). However, many flags these days are made of polyester or nylon, which release toxins and harmful gasses into the atmosphere when burned. For these flags, it is preferrable to cut the flag into quarters, and then recycle the scaps if possible. If recycling isn't available, then burial or disposal into the trash is acceptable.
For more information, please visit American Legion or Dept. of Defense
Example Flag Retirement Ceremony:
Call the audience to attention and then explain to them the importance and symbolism of the ceremony they are about to witness.
Call on the flag bearers to march the folded flag front and center.
Tell a short story about the history, meaning, and/or symbolism of the flag.
Have the flag bearers unfold and present the flag to the audience. If possible, state the owner of the flag, where it was flown, and/or any other significant history of the particular flag
Ask the audience to join in saying one final Pledge of Allegiance to the flag
Have the flag bearers fold the flag (if possible).
As Taps is being played, retire the flags either by placing the folded flag in a roaring fire.
Dismiss the audience
Ensure that the flag is completely consumed before extinguishing the fire
Once cool, remove the flag grommets from the ashes and dispose of them.
Alternatively, attach the grommets to a ribbon and gift them to a Veteran saying that these were from a flag retired in their honor, and thanking them for their service.