Habakkuk was a prophet before the fall of Israel to Babylon (Chaldea). He foresees that the Babylonians will one day overtake his nation.
The first part book is structured somewhat like a Q&A. Habakkuk questions how God can allow wicked people to do so much evil in the world. Where is justice and righteousness? God answers that He will bring justice in His own time and ways. In the case of Israel, it will come at the hands of the Chaldeans. In the case of the even more wicked Chaldeans, they would fall to powerful enemies.
The latter part of the book is a long prayer of mourning over what Habakkuk sees will happen. In the end, the prophet expresses his faith in God and trusts the Lord to strengthen him and carry him through the days to come.