1660 The marriage covenant, by which a man and a woman form with each other an intimate communion of life and love, has been founded and endowed with its own special laws by the Creator. By its very nature it is ordered to the good of the couple, as well as to the generation and education of children. Christ the Lord raised marriage between the baptized to the dignity of a sacrament
Directly from the CCC paragraph 1660.
If a marriage happens at the courthouse with a justice of the peace it is not a sacrament. And marriage for us Catholics is a Sacrament as well as a Covenant.
Hope this helps!