Questions about sex and Catholicism are very popular. The Catholic Church has firm requirements concerning sex to protect people. It isn't because Catholicism is against sex. However, sex used without a solid foundation like marriage, can be harmful and hurtful.
Roman Catholicism teaches that sex before marriage is a mortal sin. Sin disconnects you from God. If you have sex before marriage, you should not take Holy Communion until you go to confession.
From the Catholic Catechism, "Mortal sin destroys charity in the heart of man by a grave violation of God's law; it turns man away from God, who is his ultimate end and his beatitude, by preferring an inferior good to him."
If you have had sex without being married, try to go to confession as soon as possible. Learn why sex before marriage is trouble, and pray for wisdom that you understand why it's better to wait and for the courage to abstain. God loves you, understands, and He forgives.