The typology here is basically contrasting Law and Grace. The Jews believe they are saved by a righteousness of their own - which derives from keeping the Torah's commandments. In actuality, no person can keep all God's laws, and therefore, "all our righteousness is as filthy rags," in terms of anyone meriting salvation.
Of the New Covenant, Paul says, "But that no man is justified by the law in the sight of God, it is evident: for "The just shall live by faith., And the law is not of faith, but the man that doeth them shall live in them. Christ hath redeemed us from the CURSE of the law, being made a curse for us: for it is written, Cursed is every one that hangeth on a tree: That the blessing of Abraham might come on the Gentiles through Jesus Christ......" Galatians 3:11-14.
Here Paul teaches the doctrine of imputed righteousness. Christ is imputed to be sin for us (cursed on the tree), that Christians might be imputed as having Christ's righteousness. It is an exchange made at the cross. The blessing of Abraham "might come," or comes on the Gentiles. In other words, the elect are now those in Christ, and have become Abraham's children by faith.
Paul is using here typologies which would be easily understood by Jewish believers - and please note, Galatians is primarily written to rebuke the attempt to Judaize the Christian Church.
In our day, we have a movement called "the Hebraic Roots movment" and also the "Noahide" movement - both attempts by Judaizers within the Church to bring believers back under Jewish law.