There's a little bit of history to the titles Old Testament and New Testament that needs to be explained.
We begin with the Greek word διαθήκη (diatheke) which has two major distinct sub-senses and cannot be translated with a single English word.
- a last will and testament
- a compact/contract/covenant, and in this sense it was used to translate בְּרִית (berith) from the Hebrew scriptures
You may be more familiar with the Biblical language of the Old and New Covenants. There are several passages which talk about them, which I'll quote (all from the NIV) but not really dig deeply into.
“The days are coming,” declares the Lord,
“when I will make a new covenant
with the people of Israel
and with the people of Judah.
It will not be like the covenant
I made with their ancestors
when I took them by the hand
to lead them out of Egypt,
because they broke my covenant,
though I was a husband to them,”
declares the Lord.
Luke 22:20: In the same way, after the supper he took the cup, saying, “This cup is the new covenant in my blood, which is poured out for you.
2 Corinthians 3:13-15: We are not like Moses, who would put a veil over his face to prevent the Israelites from seeing the end of what was passing away. But their minds were made dull, for to this day the same veil remains when the old covenant is read. It has not been removed, because only in Christ is it taken away. Even to this day when Moses is read, a veil covers their hearts.
Hebrews 8:6-7: But in fact the ministry Jesus has received is as superior to theirs as the covenant of which he is mediator is superior to the old one, since the new covenant is established on better promises. For if there had been nothing wrong with that first covenant, no place would have been sought for another.
Hebrews 8:13: By calling this covenant “new,” he has made the first one obsolete; and what is obsolete and outdated will soon disappear.
Hebrews 9:15-18: For this reason Christ is the mediator of a new covenant, that those who are called may receive the promised eternal inheritance—now that he has died as a ransom to set them free from the sins committed under the first covenant.
In the case of a will (διαθήκη), it is necessary to prove the death of the one who made it, because a will is in force only when somebody has died; it never takes effect while the one who made it is living. This is why even the first covenant was not put into effect without blood.
So we read in Jeremiah of the promise of a New Covenant and Jesus's identification of the cup at the last supper before his death as the symbol of the New Covenant. We read in 2 Corinthians Paul say that the Old Covenant refers to the writings of Moses. In Hebrews the contrast between the Old and New Covenants is of major importance. Hebrews identifies the Old Covenant as the Israelite sacrificial system, while the New Covenant was instituted by Jesus's self-sacrifice on the cross. And in the last quote there we see the author bring both senses of διαθήκη together as he explains why Jesus's death was required to institute the New Covenant, joining the two concepts of contract and will.
These Biblical examples show the development of this idea of there being an Old Covenant of animal sacrifice which was done away with by the New Covenant of Jesus's self-sacrifice. But how did we get from there to calling the whole Hebrew Bible by the name of the Old Covenant?
The first aspect is that it is an example of synecdoche, where one thing is referred to by the name of one of its parts. So although the Mosaic covenant is only one of many covenants in the Hebrew Bible, because it was the foundation of the state of Israel, and it specified the statutes governing the formal Israelite religion, and it contained the promise of blessings and curses the prophets retold, it came to be used by Christians to refer to the whole Hebrew Bible, even though there was nothing "old" about the Noahic or Abrahamic covenants, nor were the Psalms etc. superseded.
Second, it arose through the breadth of meaning in the Greek word διαθήκη which is not shared by any of its English translations. BDAG explains that even when used in the sense of a covenant, διαθήκη has less of the sense of an agreement between two parties, and more of a "declaration of one person’s initiative". Similarly the English words testament and testimony are both derived from the Latin word testor. So the Old διαθήκη is not just a covenant, not just a will, but a testimony and witness to God.
The specific use of the terms Old Testament and New Testament to refer to the two parts of the Bible arose quite early in the history of the church. One noteable use was from Tertullian who was wrote against Marcion, who taught that the Hebrew and Greek scriptures revealed two gods who were at odds with each other, Creator and Christ. Tertullian countered by saying that the two collections of texts were two witnesses to the one God:
the Divine Word, who is doubly edged with the two testaments of the law and the gospel.
it is certain that the whole aim at which he [Marcion] has strenuously laboured, even in the drawing up of his Antitheses, centres in this, that he may establish a diversity between the Old and the New Testaments, so that his own Christ may be separate from the Creator, as belonging to this rival god, and as alien from the law and the prophets.
(Tertullian here also refers to the "law and gospel", two other labels for the Old and New Covenants, which has been used by many over the years, most notably Martin Luther.)
And there we have it. The two titles are terms where the part is used to refer to the whole, and the specific old thing is the Mosaic covenant.