I recently heard the term "chastity, according to your state of life." What exactly does this mean?

Chastity is defined by the Catechism of the Catholic Church (no. 2337) as:

Chastity means the successful integration of sexuality within the person and thus the inner unity of man in his bodily and spiritual being. Sexuality, in which man's belonging to the bodily and biological world is expressed, becomes personal and truly human when it is integrated into the relationship of one person to another, in the complete and lifelong mutual gift of a man and a woman.

The virtue of chastity therefore involves the integrity of the person and the integrality of the gift.

To be chaste "according to one's state in life" is a delicate way of saying that married people must observe the rules of sexuality within marriage (e.g., no romantic relationship with anyone not one's spouse, remaining open to the possibility of new life during marital relations), while single people must observe the rules of sexuality outside of marriage (e.g., not engaging in sexual relations, not putting oneself in a near occasion of sexual sin).