Mary had other children — she wasn't a virgin her whole life, was she?
The Church confesses Mary's real and perpetual virginity, a conviction reached as faith in her virginal motherhood deepened over time. It teaches that Christ's birth did not diminish his mother's virginal integrity but sanctified it. That is why the Church's liturgy celebrates Mary as Aeiparthenos, the Ever-virgin. The claim is about who her Son is, and about a motherhood wholly given to him.
Catechism of the Catholic Church, §§ 499.
Read the teaching itself: The Virginity of Mary in the Catechism pages.