Question: What Does It Mean When American Flag Is Upside Down?

Is it illegal to fly the American flag upside down?

.

What does an upside down Australian flag mean?