In the Roman Rite, Candlemas is another name the feast of the Purification of the Blessed Virgin Mary. The principal Mass for this great feast is preceded by the blessing of candles, hence the name, from Candle Mass.
According to the Mosaic law of the Old Testament, a woman who has given birth to a son was considered unclean for 7 days (double this time if she had a daughter) and she was to remain for 33 days “in the blood of her purification” which meant the time she was excluded from the temple. When the time of waiting was over, forty days, she was to bring a sacrifice to the temple. After offering her sacrifice, and having a priest pray over her, she was considered clean.
Read more about the history of Candlemas.