Explain the doctrine that Mary was a Virgin for life?
Mary is the only woman who had a child while still a virgin. She never had intercourse with any man not even Joseph.
She is Called the Virgin Mary, so yes she is and was a virgin. Roman Catholic Answer Yes, the Church has always taught, infallibly; and has always believed that the Blessed Virgin Mary was a Virgin before, during, and after the birth of her only son, Jesus Christ; and that she was assumed into heaven at the end of her life as a virgin.
Catholic Answer I'm not sure exactly what you mean by "believes in the Virgin Mary." Obviously most orthodox Christians believe that the Blessed Virgin Mary was the mother of Our Blessed Lord and Savior. The Catholic Church has always taught four doctrines about the Blessed Virgin: that she was the Mother of God, that she ended her life as a perpetual virgin. That she was Immaculately Conceived and that she was Assumed into Heaven…
There were some Roman Catholic reports that the Virgin Mary appeared to a nun in the 1950's, but these reports have not been independently verified. It is not impossible for the Virgin Mary to appear to someone who is very pious and leads a very spiritual life. For example, some monks on the holy mountain, Mt Athos, have apparently also witnessed visions of the Blessed Virgin Mary throughout the centuries.