The Bible doesn't tell us much about Mary Magdalene, although she was apparently an important figure to early Christianity since she was the first person to see Jesus after he was raised from the dead (Mark 16, John 20). She is also the only person who was present at all three major events of the crucifixion (Mark 15:40, Matthew 27:56, John 19:25), the burial ( Mark 15:47, Matthew 27:61), and the empty tomb (John 20:1, Mark 16:1, Matthew 28:1, Luke 24:10). Besides this, all the Bible tells us about her for sure is that Jesus cured her of seven demons (Mark 16:9, Luke 8:2). She is not mentioned in Acts or the epistles.
Some scholars such as Elaine Pagels and Raymond E. Brown suggest it's possible Mary Magdalene was originally the unnamed Beloved Disciple in the Gospel of John since whenever the Beloved Disciple and Mary Magdalene appear at the same time, there are inconsistencies indicating the text may have been tampered with.
In the Gnostic Gospels such as the Pistis Sophia and the Gospel of Mary, it's said that Jesus loved Mary more than his male disciples. The Gospel of Philip tells us that Jesus used to kiss her often. (Philip 63:34-36) Some take this as an indication that Mary was the wife of Jesus, however, kissing was a common greeting, so it's not necessarily romantic. Consider the famous scene of betrayal where Judas greets Jesus with a kiss.
The tradition that Mary Magdalene was a prostitute seems to come from combining her with the unnamed sinful woman of Luke 7:36-50 who washes the feet of Jesus with her hair and tears. Luke 7 doesn't tell us what the sin of the sinful woman was, but tradition has a way of filling in missing details.
John 11-12 tells us Mary of Bethany, the sister of Lazarus, was the one who anointed the Lord's feet. It's possible Mary Magdalene is the same person as Mary of Bethany since both are often referred to as simply Mary and they never appear at the same time. If they are the same person, that doesn't mean Mary was a prostitute, unless you also combine her with the unnamed woman caught committing adultery in John 8:2-11 who Jesus saves by telling her accusers that he who is without sin should cast the first stone. However, this pericope does not appear until later versions of John, so it's obviously a later addition. It's possible Mary was a prostitute, but it's not stated outright by the text. Or is it?
Do we know anything else about Mary Magdalene? Based on the name Magdalene, many think she came from a town called Magdala. However, there's no evidence that a town called Magdala existed. No such town is mentioned in the Hebrew scriptures or in the writings of Josephus, although some think Magdala was the city Josephus calls Taricheae. Also, Magdalene is wrong grammatically speaking. The -ene ending is not the correct one to indicate a person from a particular town, it should use the -aia ending. If Mary came from a town called Magdala, her name would be Mary Magdalaia.
In Aramaic, Magdala can mean tower, elevated, great, or magnificent. So maybe her name means Mary the Magnificent. However, there's no evidence the New Testament was written in Aramaic. All available evidence points to the original language of the New Testament being Greek. What else could "Magdalene" mean?
In his Pre-Nicene New Testament, Robert M. Price translates Mary Magdalene as "Maria the hair dresser." Maria is the way the name Mary appears in the original Greek and "medgaddlela" is a Talmudic expression referring to the curling of women's hair. This actually brings us full circle since the Talmud uses the term "hair curler" euphemistically to refer to a prostitute, so it appears Mary Magdalene (or more literally, "Maria the prostitute") was a prostitute after all.
It wouldn't necessarily have been scandalous for Mary to be a prostitute given the historical context. In his Panarion, Epiphanius tells us that Simon Magus considered himself God. He descended down to earth to rescue the prostitute Helen of Tyre, who was really the latest incarnation of the Divine Thought which had been imprisoned on earth by evil angels. Much like Jesus does in the Ascension of Isaiah, Simon Magus changed his form as he descended down through the seven heavens so the Principalities and Powers would not recognize him. (Panarion 56) Is is possible the historical Mary Magdalene was Helen of Tyre and the seven demons Jesus cast out of her correspond to the seven heavens he descended down to get to earth?