Mary Warren is John Proctor's servant, helping out with the domestic chores around the farm and home. His relationship with her varies a bit during the play, and is strained to say the least. As a servant, she would have had very few rights in the 17th century, and we get the sense that verbal chastising of Mary by Proctor was common, even the threat of physical punishment for disobeying him.
Mary is also one of the "afflicted girls" who become daily fixtures in the Puritan court and ever more involved in the increasing net of accusations against the citizens of Salem. Proctor is also perhaps a bit worried that Warren spends so much time with Abigail Williams, lest she spill the beans to Warren about their love affair. Once Proctor's wife is mentioned in court, he tries to compel Warren to come clean.
The relationship between Proctor and Mary Warren is, first of all, one of service; that is, Mary is a servant in the Proctor home. She is apparently a rather timid girl. When we first meet her, she is in a league of silence and secrecy with the other girls; they seem to sense, however, that she is the potential weak link (which she turns out to be).
In the Proctors' home she does not assert herself until she is empowered by her position in the court. Proctor is used to having her obey him quickly and without question. It's a tragically humorous moment in Act II when she refuses to go to bed when he tells her, only to claim she's ready for bed once he gives her the freedom she requests. Whipping is not, apparently, out of the realm of experience in their relationship, though we know Proctor well enough to know he might be demanding but never cruel.
By the end of Act II, John and Mary have become tentative partners in the quest to free Elizabeth (whom Mary does care for, as she made her a poppet--a token of her affection). Though Mary knows these trials are a farce, she is not strong enough to call the girls out on her own. When Mary does confront the girls in open court, she is bolstered by Proctor to speak the truth. From there she weakens as both Parris and the girls turn on her. (Nothing is more appalling to read aloud than the girls repeating every word Mary says in a kind of taunting mockery. Chilling.) In the end, Mary is not strong enough to withstand the pressure and turns on Proctor. She uses his own words against him, virtually sealing his fate before the court (her words plus the false testimony Elizabeth gives). Once Proctor is imprisoned, Mary is no longer in evidence.
In general, the two of them are adversaries throughout the story--first as a rather timid, undutiful servant vs. a demanding master, then as a witness who speaks against the accused. The only real problem Proctor has with Mary is that she's weak--both a reflection of him at his worst and the antithesis of his more honorable self.