A friend someone you know casually? Someone you've had over to your house for dinner? Or how about someone you've known a long time?
The truth is, a friend can be any one of these things. Friendships vary in depth and closeness, and there are no two of them that are alike. A Dictionary Reference.com notation about friendships defined them as:
1. a person attached to another by feelings of affection or personal regard.
2. a person who gives assistance; patron; supporter: friends of the Boston Symphony.
3. a person who is on good terms with another; a person who is not hostile: Who goes there? Friend or foe?
It seems even an "official description" varies quite a bit. The first and third of these definitions are what matter in my opinion. A friend should be drawn to you by feelings of (non-romantic) affection, and they should definitely not be hostile. This definition also helps clarify the frenemy type of person, who can be bit a difficult to pinpoint sometimes.
I think most of all, a friend is someone who gives you a safe place to be yourself. You might disagree, but they don't take joy in your heartache. They want the best for you.