Jews understand the Book of Daniel as a retelling of the legends about one of our greatest national heroes (much like Paul Bunyan of American folklore with a little Uncle Sam thrown in for good measure).
From our history we understand that there was probably an actual Jew who, prior to the Babylonian exile, lived among the Gentiles and set such an example of Jewish religious life that he developed into a legendary hero. Because he lived among the Gentiles he is always spoken of in Scripture as somewhat separate from the Jewish nation. You will note him being mentioned as a well-established figure of virtue in Ezekiel 14:14 alongside Noah and Job.
While there is a possibility that the name is not original and purposefully made to sound like the name of another heroic figure from neighboring cultures, the Biblical Daniel of the book bearing his name is neither the Gentile hero or the actual "Daniel" mentioned in Ezekiel (or even the real person all this is based on).
After the Babylonian exile and well after the Second Temple was rebuilt, the Greek-Syrain oppression began. There was much political intrigue involving other powers as well as struggles within Israel until the invasion of Antiochus IV (Ephiphanes) that led to the repression of Judaism.
It was during this period that the Book of Daniel was composed. The Jewish hero figure was transported into the circumstances of the Babylonian exile as a religio-political treatise work of propaganda countering the anti-Jewish measures occurring in the Jewish world under Antiochus.
Daniel in this book is a youth that keeps to Jewish custom despite pressure from the Babylonians that have captured him to work in King Nebuchadnezzar's court. His faithfulness to Jewish life is rewarded by God in the form of making Daniel a prophet to the Babylonians. His messages are not favorable to the Gentiles however, forecasting their eventual downfall before God's anointed. However the actual "prophecies" therein are really apocalyptic commentary about the repression of Antiochus. The author uses a series of visions as a means of telling Jewish readers that the invading Gentiles will be conquered, that God will raise a new king in Israel, and that the new kingdom will crush the oppressors. This of course happened in the uprising orchestrated by Judah Maccabee and the eventual liberty of the Jews under the Hasmonean dynasty. This allowed the Book of Daniel to be preserved.