The Catholic Church teaches that there is mortal sin and venial sin. Mortal sin is basically deadly sin. Mortal sin is sin that severs our relationship with God. Venial sin damages our relationship with God, but does not sever the relationship.
“If anyone sees his brother sinning, if the sin is not deadly, he should pray to God and he will give him life. This is only for those whose sin is not deadly. There is such a thing as deadly sin, about which I do not say that you should pray. All wrongdoing is sin, but there is sin that is not deadly.” – [1 John 5:16-17]
So, how do we re-establish our connection with God after mortal sin? We are to go to the people whom Jesus ordained to forgive sins. Jesus appeared to His disciples after His resurrection and said, “Whose sins you forgive are forgiven them, and whose sins you retain are retained.” – [John 20:23] So, Jesus gave priests the power to forgive our sins. It is not their own power, but power that Jesus gave to them.
How do we know if we have committed a mortal sin, though? For a sin to be a mortal sin, it must (1) be of grave matter, (2) be committed with full knowledge, and (3) be committed with deliberate consent. So, it must be very important, you must know that it is a grave sin, and you must be committing the sin freely. If someone has a gun to your head, you cannot commit a mortal sin.
Let us pray that we do not get comfortable with venial sin so as to allow ourselves to commit a mortal sin and sever our relationship with the One who has loved us into existence.