(Unfortunately, due to a bug, he might not spawn in when typing "I want a friend", so use cheats to summon him if wanted.)
Your friend will always try to stick close, which means no matter how far you are away from him, he'll catch up to you! Try to not make him mad, by letting him die. Try to protect him from anything whatsoever, or else he might lose it. He'll give you items in a decent amount of time, items depending on how you treat him!
Have fun with your friend!