Chapters 7 and 8 actually take place prior to chapter 5. Remember that Belshazzar's father, Nabonidus, was actually king of Babylon, the Empire, and Belshazzar was his coregent in the city of Babylon. To this point Daniel had been interpreting the dreams of others, but now God gives him extraordinary visions of his own. In these visions Daniel sees the course of Gentile history, and this vision helps us to understand what will happen to the Jews in the end days.
The restless sea in the Bible is often a picture of the Gentile nations. Here, it is the Great Sea, or the Mediterranean Sea, and all the empires mentioned in this vision border, in one way or another, on this Sea. Daniel saw four beasts, and the angel explained what they meant. Each beast represented a kingdom. The lion with wings (chapter 7:4) is a picture of Babylon; the bear with ribs is a picture of the Medo-Persian Empire; the winged four-headed leopard is Greece; and the terrible beast is the Roman Empire.
In chapter 8 we have the vision of the ram and the he-goat. This vision is actually an amplification of chapter 7:6, explaining how Greece will conquer Medo-Persia. It takes place two years after chapter 7, and describes the kingdom that will follow Babylon after it falls. Daniel was in Jerusalem, but God carried him, in a vision, to the capital of Persia. The he-goat appearing from the west represents Greece. Note that the ram had two horns, one higher than the other, symbolizing the Medes and the Persians, with the Persians being the stronger of the two. The he-goat had one great horn. This was Alexander the Great. When the he-goat attacked the ram, its two horns were broken. This represents Greece's victory over Medo-Persia. Then we see the great horn broken. This was the death of Alexander.
The little horn in chapter 7:8 represents the Antichrist, the last world ruler and the final world empire before the return of Christ to earth. But the little horn in chapter 8:9 comes out from one of the four horns--that is, he is one of the leaders who comes from the four divisions of Alexander's kingdom. So this little horn is not the Antichrist of the latter days, although he has a definite connection with him. The little horn here conquers nations to the south and east, and then invades Palestine. He not only attacks the Jews politically, but also religiously, for he tries to destroy their heavenly faith by stopping the sacrifices in the Temple.