The phrasal verb "to go up" has a number of different meanings; I knew which one it had within the context of the sentence but to my surprise, it was difficult to find an online dictionary which listed that precise definition. Thereby, explaining why the OP couldn't "get the exact meaning". Here the expression to go up 5 means to reach a destination (usually by vehicle) that is higher up.
The sentence,
He went up to Mary's at about 8 o'clock.
has a certain ambiguity that without knowing what happened earlier or later in the story could possibly mean three different things.
The first one, the man was already at Mary's house before 8 o'clock. Perhaps he was her husband, boyfriend, brother, or father we don't know. Nevertheless, at about 8 o'clock he went upstairs to Mary's room. Maybe she was unwell and he wanted to check if everything was all right. Again without more information, we cannot know.
The second interpretation, and the most likely, is the following; at around 8 o'clock he drove/travelled up (northward) to Mary's house. If she lived southward or at the bottom of a hill, the sentence would start with: *He went down to Mary's (house)
Finally, from a third and British perspective it could be that Mary lived in a big important city, regardless of its geographical position so, paraphrasing, we end up with "He went up to [London] where Mary lived."
In the context where you've seen this remark, I assume the word is a synonym for jerk, which means:
A foolish, rude, or contemptible person.
I'd guess that the conversation that you allude to was more or less talking about the "bad boy" phenomenon. As one columnist wrote:
I'm often questioned by men who tell me they are "nice guys" but feel ignored by women who, they say, "prefer to be treated like crap". While I don't agree that nice guys always finish last, I do understand that we women do make some damn silly dating decisions.
Most of the men I know are kind, polite and adorable in practically every way, yet, like many women, I have an illogical soft-spot for massive jerks. There is something about bad boys that we find incredibly appealing, even though we often regret the experience afterwards.
I can't say if this is reality, myth, or urban legend, but there is a lot of serious discussion on the topic. As for why it's true (or if it's true), that would be a question for Cognitive Sciences – but at least you now know what the phrase is talking about.
Best Answer
Simpler wording might be:
or