Julia and O'Brien's relationships with Winston share several contrasting features.
For example, with each character Winston anticipates their relationship but his predictions are off. In the beginning, Julia is "the dark haired girl" for whom Winston finds great hate during the Two Minutes Hate. Ultimately, throughout Book Two, Winston finds himself sincerely falling in love with her to the degree that they offer great commitment to each other. In the beginning, O'Brien strikes Winston as a trustworthy companion. Winston believes that the two of them communicate with their eyes as like-minded rebels to the Party. Throughout Book Two, O'Brien indeed lets Winston believe he is a like-minded rebel, but by Book Three, it is apparent that O'Brien is an enemy.
Each relationship positions itself to provide secret companionship, but Julia is the only one who is sincere.
Winston wants to have both love and intellectual challenge from Julia, but she only offers physical love. Winston believes he might find that intellectual challenge and camaraderie in O'Brien.
Orwell uses these relationships to further develop the everyman in Winston. Winston really struggles with reading the truth in people. This just typifies him as the average man.
The relationship Winston has with Julia, is more romantic in terms that she fulfills his need for a physical act against the party. She also lets him experice human feeling properly for the first time (feelings of love that can't be felt with others in this society). However, she is unable to understand him and his want for a revolution because she is fine with the way things are. Winson's need for being understood is fulfilled with O'Brian. In the begining Winston feels a connection with O'Brian and this connection is not broken even after he is revealed to be the enemy. O'Brian understands Winston unlike Julia. Therefore, Julia fulfills Winston's need for human interactions and his need for love, while O'Brian fulfills his need for an intellectual connection.