What does it mean when the US flag is flown at half mast?

Someone important has died. I t also shows respect for that person.

it is usually flown to symbolize a tragedy, it could be a person as stated above or it could be an event such as pearl harbor or 9/11