"Sun and moon stood still in the heavens at the glint of your flying arrows, at the lightning of your flashing spear. In wrath you strode through the earth and in anger you threshed the nations." NIV translation
In this passage, the prophet remembers the battle that Joshua fought with the five kings (Joshua 10) and the prayer that was answered. Joshua prayed for this to happen and God did it while His wrath was carried out by Joshua and his men. This reminded Habakkuk of the fact that God answers the prayers of His people and it is the same thing that James spoke of when he said "the prayer of a righteous man is powerful and effective" (see James 5). That same assurance is for us today in that, when we pray in faith, God answers in power.
"You came out to deliver your people, to save your anointed one. You crushed the leader of the land of wickedness, you stripped him from head to foot. Selah" NIV translation
The prophet remembers that, when God's people were attacked, He fought for them.
God is the same today, in that, He will take care of His children. We may be attacked but we cannot be defeated.
"With is own spear you pierced his head when his warriors stormed out to scatter us, gloating as though about to devour the wretched who were in hiding. You trampled the sea with your horses, churning the great waters." NIV translation
Habakkuk remembers that God takes care of those who humble themselves. As they hid in fear, God stepped in on their behalf. If we humble ourselves and call on the name of God, He will fight on our behalf as well. This gave the prophet comfort and it can help us through our struggles as well.
"I heard and my heart pounded, my lips quivered at the sound; decay crept into my bones, and my legs trembled. Yet I will wait patiently for the day of calamity to come on the nation invading us." NIV translation
Although he is afraid, the prophet has resolved to trust in God for deliverance in the face of the enemy. When we face fear and doubt, as brought on by the enemy (Satan), we, too, can resolve to stand firm in the knowledge that God will defend us.