The Magi were a group of people described as being 'Wise Men'. The word magi comes from magic, when, in past ages, magic meant, among other things, those who were experts at astrology - reading the stars. So Magi means those who were good at reading the stars, and, of course, it was the Star of Bethlehem that they were following.
Matthew uses the term in his Gospel because people like this were thought of as clever and so it gives weight to his story.
The Gospel of Matthew tells that the Magi visited the infant Jesus shortly after His birth. When they arrived in Jerusalem, they visited King Herod. This was part out of courtesy, because they were nobles visiting another kingdom, and in part to find the exact place where the King of the Jews had been born.
Herod, of course, knew nothing of Jesus, and he was worried. However, he did tell them of a prophecy that the Messiah would be born in Bethlehem. He then asked the Magi to tell him when they had found the infant so that he, Herod, could also worship Him.
With this small extra amount of information, the Magi found Jesus in a home (which might have meant a stable, or a cave). Here they worshipped Him, and presented Him with gifts of gold and of frankincense and of myrrh. Then, in a dream they were warned not to go back to Herod with this news, and therefore they went back to their own lands by another route.