It was an atonement. The wages of sin is death.
"Then when lust hath conceived, it bringeth forth sin; and sin, when it is finished, bringeth forth death."
Each year, the high priest had to sacrifice a specific animal that had no blemish in order to atone for the sins of Israel. The blood of this animal was sprinkled on the mercy seat of the ark of the covenant. Beside the mercy seat on the ark were two cherubim looking down at the seat, representing God's judgement. Once the blood was sprinkled and the glory and judgment of God came to the tent, His wrath was turned away upon seeing the blood. The price was paid and judgement passed over, just like in Egypt.
In order for the sacrifice to be accepted, it had to be without blemish. The best of the best. So in order to fully wash away all of mankind's sin and not just cover them, something greater had to be sacrificed. So God did it himself, through Jesus by wrapping himself in flesh and being the perfect example. By being wrapped in flesh, He was able to experience everything that we are tempted with yet overcome each one. Then like a lamb led to the slaughter, He was sacrificed. His death forgives sin because like with the above paragraph, whenever God's glory would look at the mercy seat and see the blood, His wrath was turned away. With Jesus' death, he ascended into heaven as our high priest, mercy seat and mediator between God and man. The job of the high priest was to be the mediator between God and man, pleading for forgiveness. If he wasn't right(life wise) everyone depending on him would be in trouble. This time, we don't have to worry about whether the high priest is in good standings or not. Now, Jesus is the only high priest in heaven who we have direct access to, went through all types of temptation and can identify with us since He overcame them.
When we sin, God sees the blood of Jesus on us(through baptism in Jesus name) and His wrath is turned away as the price has already been paid while we see the man Jesus. Its like having a coin placed in between you and someone else. One person sees heads, the other sees tails. We see the man Jesus, God sees the bloodied sacrifice and has mercy. It doesn't mean that we are free to sin but that when we slip up, it's been paid for.