"We wasted" indicates that time was spent unnecessarily or unproductively.
"an hour" is the amount of time that was wasted. The indefinite article "an" is used instead of "a" because "hour" starts with a vowel sound.
So, the sentence as a whole means that the speaker and possibly others spent one hour waiting for the rescue team, and that time was spent unnecessarily or unproductively.