Our text reflects Mary’s praise to God while she visited her relative Elizabeth in the preceding verses.
In the first three verses she gave thanks for God’s consideration for her. She was to give birth to the prophesied Messiah, the son of David, “Immanuel” (cf. Matthew 1:23), and she praised the Lord saying, “And holy is His name” (49).
Verses 50-55 are a statement of Christ’s purpose in being sent. God’s plan for redeeming man from their sins. God’s mercy is shown to those who fear Him. He resists pride and willfulness, but shows His mercy to the lowly, exalting them; and the hungry, feeding them. As Mary said, “He has helped His servant Israel, in remembrance of His mercy, as He spoke to our fathers, to Abraham and to his seed forever” (54-55).
Verse 56 says Mary stayed with Elizabeth for three months before returning to her own home. John the Baptist and Jesus were about 6 months different in age (cf. 36, 41, 56-57).