Friendship is something that gets harder to understand, every damn year of my life. Friendship is like a kind of algebra test that nobody passes. In my worst moods, I think the best you can say is that a friend is anyone you don't despise.
You can read a dozen different textbooks or how-to manuals that will tell you the basic rules of what makes a story - a beginning, a middle, and an end.