It is important to know who you are required or expected to salute.  Always salute the President of the United States. Perform a salute to any commissioned and warrant officers. Salute all Medal of Honor recipients, regardless of rank. Salute officers of friendly foreign nations. Perform a salute during the National Anthem. You should also salute during renditions of "To the Color," "Hail to the Chief," or other foreign national anthems are played. To an unfurled national flag outdoors. Perform a salute when the flag is about six feet away, and hold the salute until the flag is six feet past you. Salute during appropriate ceremonies. This includes military funerals, change of command ceremonies, and reveille and retreat ceremonies when the flag is raised and lowered. Perform a salute during the sounding of honors. Salute during the Pledge of Allegiance. Salute when rendering reports. When you see officers in official vehicles. Do not salute indoors unless reporting to a superior officer. Do not salute when your hands are occupied or it is impractical to salute. In such instances, a greeting can be used in place of the salute. Do not salute when operating a moving vehicle. Use good judgment in public areas. Salutes are unnecessary if you encounter a superior officer on a train or at a bus station. Soldiers on a work detail or playing a game should not stop their activity to perform a salute. Do not salute an NCO (non-commissioned officer).

TL;DR in Indonesian:
Kenali siapa saja yang perlu diberi hormat. Lakukan penghormatan di acara-acara khusus. Jangan beri hormat saat kondisinya tidak memungkinkan atau bertentangan dengan regulasi.