All Catholics are obliged to attend Mass every Sunday and on Holydays of Obligation (or at the vigil Mass on the evening before). The celebration of Mass on the Lord’s Day fulfils the third commandment and is the heart of the Church’s life. At Mass we not only demonstrate our faithfulness to Christ and the Church but we join with Christ in his own worship of God the Father. To deliberately fail in this obligation is a grave sin.
To forget, or to miss Mass through carelessness, can still be sinful, especially if it indicates that the Lord does not have first place in our hearts.
However, there is no sin if you miss Mass for a serious reason, such as illness. Even so, you should make a prayer of spiritual communion, found in many Catholic prayer books.