While this question is similar to this question, I'm certain the answer will be very different, and far more complex....
How was the Old Testament compiled?
Christianity Stack Exchange is a question and answer site for committed Christians, experts in Christianity and those interested in learning more. It only takes a minute to sign up.Sign up to join this community
The following is taken from a section of the Introduction in the "Complete Jewish Bible", English Version by David Stern, entitled The Canon
Scholars agree that the canon of the Torah achieved its present form before the time of 'Ezra (around 445 B.C.E.), the Prophets later and the Writings last. But the final review of the canon was made by the Council of Yavneh (Jamnia) convened around 90 C.E. by Rabbi Yochanan Ben-Zakkai in the wake of the destruction of the temple by Romans twenty years earlier. Several books now included in the Tanakh were questioned—Daniel and Ezekiel, because of their startling visions and experiences; Esther, because God is not mentioned in it; Song of Songs, because of its overtly sexual character; and Ecclesiastes, because of its depressed world-viewpoint (except for the last two verses, which redeemed it). Ecclesiasticus (not the same as Ecclesiates) was rejected by the rabbis of Yavneh but is found in the Apocrypha, a collection of fifteen ancient Jewish books that include Tobit, Judith, 1-2 Maccabees and the Wisdom of Solomon. Catholic and Anglican Bibles include the Apocrypha. Some sixty other ancient books are collectively called the Pseudepigrapha. English language editions of the Apocrypha and the Pseudipigrapha are available.
There are several more pages of history regarding the formation of newer versions, New King James, etc. and the attribution of writings (who wrote which book) for the books of the Tanakh (Old Testament) in the Introduction I've sighted above. However, the passage above seems to best answer the question about the actual "compiling" of the Old Testament.
Since there is only one answer at the moment, I will add mine, which is from my comments.
Basically, for Christians the OT canon was still in flux until 1647 when a final decision was made as to which books would be in the Episcopalian Bible, so the OT wasn't compiled until then.
Even the Jews didn't have a unified canon until after the death of Christ.
As long as books are being added/removed/rearranged, it is in the process of being compiled.
For links to explain these dates you can look at When was the OT canon as used by Protestants finalized?.
So, it was compiled by people coming together to determine which books should be where, and in some cases decisions to rename or split a book was made. Each group had their own reasons for their decisions, and these could be debated, but basically, long ago these decisions were argued and made, and then other groups would re-debate and make some modifications, based perhaps on newer information or better understanding.