Prior to Flag Day 1923 there were no federal or state regulations governing display of the American Flag. On that date the National Flag Code was adopted by the Army & Navy. However, it was not until 1942 that Congress passed a joint resolution which become Public Law 829; Chapter 806 that added specific rules for use and display of the flag and public conduct during the national anthem and Pledge of Allegiance

While the law formalizes all aspects of handling, displaying and disposing of an American Flag, some that may be of interest to you today include:

Parading & Saluting the Flag: When carried in a procession, the flag should be to the right of the marchers. When other flags are carried, the flag may be centered in front of the others or carried to their right. When the flag passes in a procession, or when it is hoisted or lowered, all should face the flag and salute.

The Salute:  Everyone should become silent and come to attention. Those in uniform give the appropriate formal salute. Citizens not in uniform salute by placing their right hand over the heart and men with head cover should remove it and hold it to left shoulder, hand over the heart.

The Pledge of Allegiance & National Anthem: The pledge of allegiance should be rendered by standing at attention, facing the flag, and saluting.  When the national anthem is played, citizens should stand at attention and salute through the entire song. The salute is directed to the flag.

Currently, the federal code does not impose penalties for misuse of the U.S. Flag. Prior to 1989 criminal penalties for certain acts of desecration to the flag were contained in Code however the Supreme Court found them unconstitutional.  An amended version of the code was also struck down in 1990.

Source: USFlag.org