'Friend'

I am trying to understand that word, friend is it a person you call on when things are bad for you and then you need them.or is a person you call to brage to about the thing you have and thay don't.how do you know who you can trust when thay call you friend.