The details on the origin of each book are given in that sections on those books, but the origin of the Old Testament as a whole is a separate and interesting subject.
The traditional collection of what we call the 'Holy Scriptures' of the Old Testament from it's beginnings in Judaism has been called by many names. The earliest reference is perhaps the Hebrew word for 'books' and is refered to in Daniel 9:2. Another name used was the Hebrew word for 'that which is read', which indicated how these books were used in the synagogue. 'Scripture', used frequently in the New Testament, reflects another Hebrew word which means 'that which is written'. Within this collection of sacred books, were three major divisions. The Hebrew word 'torah' which means 'teaching (of the law)', was sometimes used to designate the whole collection of books, but more correctly refered to the first major section called the Pentateuch (the first five books: Gen., Exod, Lev., Num., and Deut.) The next section was called 'The Prophets', which was subdivided into the Former Prophets (i.e. Josh., Judges, Samuel, and Kings), and the Latter Prophets (Isaiah, Jer., Ezek., and the 12 (minor prophets)). The final section is 'the Writings', and consists of Psalms, Proverbs, Job, and Song of Solomon, Ruth, Lamentations, Eccl., Esther, Daniel, Chronicles, Ezra and Nehemiah. This order is different from our modern Old Testaments, but reflects the typically used order of the time based on importance, hence the saying: 'the law and the prophets, and other books'.
It is not known how the original collection process happened, although there is reference to the early collections of books, and the authors of the books in the Babylonian Talmud. Apparently various books were accepted as scripture by the early rabbis and gathered for reading and study in the synagogue. Scripture was determined based on the fact that the author was considered to be a prophet, that is under the influence of the Holy Spirit. This fact was accepted by Jesus as evidenced by his use of the Old Testament.
The term 'Old Testament' makes sense only to Christians, who declare that there is indeed a 'New Testament'. Although much of the 'Holy Scriptures of Judaism' are the same as the Old Testament, they are not identical. Aside from the order of the books being different, there are additional books included in the Roman Catholic Old Testament canon, the 'reformed' Old Testament canon, and the Orthodox collection. This uncertainty about what is part of the Old Testament still exists today, although some official canons were declared over the past centuries. In 170 A.D., Melito of Sardis declared the collections of Jewish scriptures found in the Jerusalem church to be the official OT canon for Asia Minor. This also became the OT canon for the Egyptian church. But later, in 348, Cyril of Jerusalem, declared the OT canon to additionally include the book of Baruch, and the Letter of Jeremiah. The African churches at the synods of 393 (Hippo) and 397 (Carthage), had an enlarged collection of books which include what we today call the 'deutero-canonical' books of the Roman Catholic Church. Protestant churches rejected this canon however accepting only the Scriptures of Judaism.