The Temple in Jerusalem had an inner room called the Holy of Holies, or the Most Holy Place. It was a sacred room that no ordinary person could enter, as it was God’s special dwelling place in the midst of His people. A thick curtain separated the Holy of Holies from the rest of the temple. This curtain, known as the “veil,” was made of fine linen and blue, purple and scarlet yarn.
The Jewish custom called Kriah, means “tearing one’s clothes” in Hebrew. This was done to mourn the death of a loved one. (It was also done as symbolic death for someone whose relationship you would consider dead; Essentially saying "You’re dead to Me!”
Kriah is a tradition found throughout the Old Testament: When Jacob believed that his son Joseph was dead, he tore his garments (Gen. 37:34). Likewise, in 2 Samuel 1:11 we are told that King David, and all the men with him, took hold of their clothes and rent them upon hearing of the death of King Saul and Jonathan. Job, in grieving for his children, stood up and rent his clothes (Job 1:20)
After questioning Jesus to see if he was the Messiah, the High Priest Caiaphas tore his garments in response to Jesus’ answer. (Matthew 26:65 and Mark 14:63) (Caiaphas and the whole cabal of priests were symbolically saying to Jesus “You’re a Dead Man!”)
God ripped the veil in the temple as a prophetic act demonstrating that the Old Covenant priesthood, temple, and it's ceremonial form of worship were forever dead, and rejected by God. With the Old Covenant now voided, the New Covenant (paid for by Jesus' bloody death) was in effect going forward.