The US Code (Titles 4 and 36) specifies four circumstances for rendering the hand-over-heart salute:
1. When the US flag is raised or lowered
2. When the US flag is carried past in a review or parade
3. When reciting the pledge of allegiance
4. When the national anthem is played
The saluter should face the flag in all cases. If the national anthem is played when the flag is not displayed, the saluter should face the source of the music.