That Mary Magdalene was a prostitute is just one of the many depictions of her put forward over the centuries. She has also been made out to be the seductress of Jesus (for instance, the film The Last Temptation of Christ), Jesus’ wife (a myth debunked by Duke scholar Mark Goodacre—see note below), or a promiscuous woman. None of these claims are supported by the biblical texts.
The Catholic church formally rejected this characterization of Mary in 1969, but it continues to be perpetuated through Easter sermons, as well as books and films like Jesus Christ Superstar (1973), The Last Temptation of Christ (1988), The Passion of the Christ (2004), The Da Vinci Code (2006) and most recently, Risen (2016), a Columbia Pictures film starring Joseph Fiennes. 
1. Why She is Called “The Magdalene”
The most likely reason Mary is called “The Magdalene” is that she was from Magdala, a thriving fishing town on the coast of Galilee. While there were other towns with similar names, Magdala is within walking distance of Capernaum, where Jesus was based at the start of his ministry. Recent archaeological findings in the current day Israeli town of Migdal, including a first century-synagogue, support this explanation.
There are other theories about the title “Magdalene” (explained here). Whatever the origin, this “nickname” helps us distinguish her from the half-dozen Marys mentioned in the Bible. Of course, the most distinguishing characteristic about this Mary is that Jesus cast seven demons out of her (Luke 8:2-3).
2. How She Became Known as a “Repentant Prostitute”
The characterization of Mary Magdalene as an adulteress or prostitute shows up several hundred years after the time of Christ when her identity was merged with that of the sinful woman who anoints Jesus’ feet). This “composite Magdalene” was popularized in a sermon given by Pope Gregory I around 591 AD. Here is an excerpt:
She whom Luke calls the sinful woman, whom John calls Mary, we believe to be the Mary from whom seven devils were ejected according to Mark. And what did these seven devils signify, if not all the vices? It is clear, brothers, that the woman previously used the unguent to perfume her flesh in forbidden acts… What she therefore displayed more scandalously, she was now offering to God in a more praiseworthy manner.” — Pope Gregory the Great (homily XXXIII)
Conflating the stories of biblical characters was not uncommon in those days. But Mary Magdalene is named at least 12 times in the gospels, and not one of those references supports this interpretation. 
3. She Traveled With Jesus and the Disciples
The most important thing to know about Mary is the depth of her devotion to Jesus. The gospel writers are specific in noting that Mary and a number of other women had followed Jesus from Galilee (Matthew 27:55). The first mention of her is in Luke 8:2-3, so we know that she was with Jesus from the beginning of his ministry. The last mention is in John 20, where we find Jesus appearing to her at the empty tomb.
Mary left home and all that she had to follow Jesus for most of his three year public ministry. The film Magdalena: Released From Shame imagines this experience for us from Mary’s perspective.
4. She Funded Jesus’ Ministry
In Luke 8:1-3 we read that at the start of Jesus’ ministry:
The twelve were with Him, and also some women who had been healed of evil spirits and sicknesses: Mary who was called Magdalene, from whom seven demons had gone out, and Joanna the wife of Chuza, Herod’s steward, and Susanna, and many others who were contributing to their support out of their private means.”
Most scholars agree that this was financial support rather than domestic support, although the women probably did that as well. Bauchman writes “throughout the New Testament and frequently outside the New Testament [the Greek phrase used here] refers to material possessions or economic means” (p. 113). For example, the same term is used in Matthew 19:21 when Jesus tells the rich young ruler to sell his possessions and give the money to the poor.