It is an expression of distress, disappointment, or sadness. It's similar to saying "Oh no!" or "That's terrible!" in English.
Here are some examples of how it might be used:
* "¡Aye que mal! Se me olvidó el cumpleaños de mi amigo." (Oh, how bad! I forgot my friend's birthday.)
* "¡Aye que mal! Perdí mi teléfono." (Oh, how bad! I lost my phone.)
* "¡Aye que mal! Se canceló el concierto." (How awful! The concert was canceled.)
It's important to note that the phrase is often used in a more informal or colloquial context. You wouldn't typically use it in a formal setting.