قَالَتْ رَبِّ أَنَّىٰ يَكُونُ لِى وَلَدٌ وَلَمْ يَمْسَسْنِى بَشَرٌ ۖ قَالَ كَذَٰلِكِ ٱللَّهُ يَخْلُقُ مَا يَشَآءُ ۚ إِذَا قَضَىٰٓ أَمْرًا فَإِنَّمَا يَقُولُ لَهُۥ كُن فَيَكُونُ Qur’an Aal-Imran (3:47)Q a lat rabbi ann a yakoonu lee waladun walam yamsasnee basharun q a la ka tha liki All a hu yakhluqu m a yash a o i tha qa da amran fainnam a yaqoolu lahu kun fayakoon u
See {19:16-22} and the corresponding notes. In the context of the story of Mary in Al 'Imran, the announcement made to her, as well as the parallel one to Zachariah (verses {39-40} above), is meant to stress God's unlimited power of creation - specifically, in both cases, His power to create the circumstances in which His will is to manifest itself - and thus to bring about any event, however unexpected or even improbable it might seem at the time of the announcement.
She was addressed by angels, who gave her God's message. In reply she speaks as to God. In reply, apparently an angel gives God's message.