From Pope St. John Paul II’s encyclical Veritatis Splendor (1993):
The text of the Letter to the Romans which has helped us to grasp the essence of the natural law also indicates the biblical understanding of conscience, especially in its specific connection with the law: “When Gentiles who have not the law do by nature what the law requires, they are a law unto themselves, even though they do not have the law. They show that what the law requires is written on their hearts, while their conscience also bears witness and their conflicting thoughts accuse or perhaps excuse them” (Rom 2:14-15).
According to Saint Paul, conscience in a certain sense confronts man with the law, and thus becomes a “witness” for man: a witness of his own faithfulness or unfaithfulness with regard to the law, of his essential moral rectitude or iniquity. Conscience is the only witness, since what takes place in the heart of the person is hidden from the eyes of everyone outside. Conscience makes its witness known only to the person himself. And, in turn, only the person himself knows what his own response is to the voice of conscience.
— Veritatis Splendor 57