The Old Testament was written many years before Jesus was born into this world. God inspired different prophets in Israel to write the Old Testament. The Bible progressively reveals God more and more throughout sctipture. The Old Testament speaks or points to the coming Savior (Christ). There are many types (pictures) of Christ in the Old Testament. God reveals much about His character and about His attributes.
There is much history in the Old Testament that we can learn from. Hopefully, we can learn from the mistakes of others and won't have to learn from our own mistakes.
God chose to give most of the scriptures to us using the nation of Israel. He also used Israel to bring Christ, our Savior, into the world.
Some things that are found in the Old Testament don't apply to the church, or to us today. For instance, God gave Israel specific diatery laws which were only given to Israel and for a specific purpose.
For whatsoever things were written aforetime were written for our learning, that we through patience and comfort of the scriptures might have hope. Romans 15:4 We are to learn form the Old Testament scriptures. We can also draw patience, comfort and hope from them.