Recaps:
Mary Jane in Spider-Man
In 2002's Spider-Man, Mary Jane is Peter Parker's high school crush and only sweetheart. At the time, she was dating the high school bully, Flash Thompson. Flash figures into the comic storyline in more detail, but his initial purpose is the same - to cause Peter to begin to stand up for himself and gain some measure of self confidence. Flash and MJ break up at their high school grad ceremony. Parker's friend, Harry Osborn, is her first boyfriend after leaving high school, but she manages to fall in love with Parker and his alter-ego, Spider-Man. Mary Jane begins to grow more distant from Harry, denying his advances. After Harry sees Peter and MJ holding hands, he gets angry and breaks up with her.
The Green Goblin, who is Harry's father Norman Osborn's alter ego, kidnaps her and holds her over the Queensboro Bridge. He tells Spider-Man that he must choose between her and a group of children caught in the Roosevelt Island tram car. Spider-Man manages to save both Mary Jane and the children. (In the comic book, it was Gwen Stacy who was held over a bridge, and Spider-Man's attempt to save her failed.)
The Green Goblin announces plans to torture and kill Mary Jane to Spider-Man during the climax, but he dies before having the chance to act upon his threat.
Peter shies away from Mary Jane at the end of the film as he is afraid for her safety, and thus does not want to get involved with her.
Mary Jane in Spider-Man 2
Spoiler warning: Plot and/or ending details follow.
In 2004's Spider-Man 2, Mary Jane's hair is now a more realistic shade of red (not the bright red from the comics.) She wants to start a relationship with Peter Parker. Peter backs away from a relationship with her even though he wants one because he fears for her safety. In her frustration Mary Jane goes on to have a relationship with John Jameson, the astronaut son of Daily Bugle publisher J. Jonah Jameson.
The movie hints that she is doing this in the hope of making Peter jealous. Peter decides that being Spider-Man is not what he wants and comes back to Mary Jane so that he could start a relationship with her. Mary Jane pushes him away this time because she is getting married to John Jameson, but secretly does want a relationship with Peter. After kissing the astronaut, in a manner that is reminiscent of the upside-down kiss between Mary Jane and Spider-Man from the first Spider-Man movie, she finds that she may really want a relationship with Peter Parker.
She meets Peter in a coffee shop where she asks for a kiss to confirm her beliefs. Just before Peter can kiss her Doctor Octopus snatches her and runs away. Doctor Octopus takes her to an abandoned pier where Spider-Man confronts him. Spider-Man pulls his mask off in hopes of getting Doctor Octopus to come back to his senses, and Mary Jane realizes that Spider-Man and Peter Parker are one and the same.
Mary Jane runs away from her wedding with John Jameson and comes to Peter's door where she tells him that she is grown up enough to make her own decisions and she loves him and will take him as Spider-Man knowing the danger it poses to her life.