Barney Stinson (Neil Patrick Harris) is Ted's wingman and good friend (though Barney considers Ted his best friend).
Barney is a womanizer and it's revealed it's the way he is because he was once a hippie who wanted to join the peace corps but lost his one serious girlfriend, Shannon, to a suit wearing rich womainizer.
Barney then became that man and ever since is always seen out in a suit (except to funerals) and utters some of the best catch phrases and pickup lines in television history.
Barney once violated the bro code and slept with Ted's ex-girlfriend, Robin. Barney has true feelings for Robin, as revealed to Lily, but does his best to hide them. They ended up dating briefly but broke up after half a season.
Jerry: A magician never reveals his greatest trick, but I'll give you a hint. You've gotta meet the right girl. Who knows, maybe you'll meet her tomorrow?
Barney: Maybe I've met her already.
Whatever you do in this life, it's not legendary, unless your friends are there to see it.Barney