There are two basic approaches to the book of Daniel. The first is more biblicistic and credulous. This approach treats the stories as factual historical accounts and the visions as predictions of future events. Future, that is, from the author's perspective. The book, according to this perspective, was written or compiled shortly after the events that it narrates, around 530 BCE. The introduction to Daniel in the NIV Study Bible (p. 1319) is a good example of this school:
The widely held view that the book of Daniel is largely fictional rests mainly on the modern philosophical assumption that long-range predictive prophecy is impossible. Therefore all fulfilled predictions in Daniel, it is claimed, had to have been composed no earlier than the Maccabean period (second century B.C.) after the fulfillments had taken place.The NIV Study Bible identifies the 4 kingdoms referenced in chapters 2 and 7 as Babylonian, Medo-Persian, Greek, and Roman. It states flatly that the symbolism of the 4th empire is "unmistakably Rome." It also argues that the language in which Daniel is written is characteristic of the 6th century BCE.
The second approach is more historical-critical and skeptical. This approach sees the stories of chapters 1-6 as folk tales and treats the visions of chapters 7-12 as recitations of history. The Jewish Study Bible (pp. 1641-2) is representative:
Because of the detailed nature of apocalyptic timetables, the dating of at least the last chs of Daniel can be established precisely. Scholars consider the predictions in this book, as in other apocalypses, to be prophecies after the fact, purportedly written down centuries earlier and kept secret in order to give credence to other predictions about the end of history. The recounting of history, then, though symbolic, can be matched quite easily with the history of the ancient Near East in the Greek period. The predictions are detailed and accurate until the end of the Maccabean revolt in 164. At that point, however, they veer dramatically from what we know of the actions of the Seleucid king...and scholars assume that the author lived and wrote at the precise time when the predictions become inaccurate.
In this view the 4 kingdoms are Babylon, Medea, Persia, and the Seleucids.
Personally I find the arguments for later composition convincing. I don't believe that the truth of Daniel depends upon its facticity.
Interestingly Christians were debating over essentially these same views as early as the 4th century CE.
The stories of chapters 1-6 dealing, as they do, with Jews living in the court of foreign royalty, are related thematically to the Joseph saga in Genesis 37-50 and the book of Esther. The visions are the clearest example of apocalyptic literature in the Hebrew Bible. Like other apocalypses, Daniel was written pseudonymously in the name of a revered historic person.
Christian Bibles place Daniel after Ezekiel as the fourth "Major Prophet." Jewish Bibles put the book of Daniel among the "Writings."
The Septuagint version of Daniel includes some significant additions: The Prayer of Azariah and the Song of the Three Young Men, Bel and the Dragon, and Susanna. These can be found in Roman Catholic and Orthodox Bibles. If they are included in Protestant Bibles at all it is under the heading of Apocrypha. The stories of Susanna, and Bel and the Dragon, may be the oldest known examples of detective fiction.