More formal than 友達. Used in writing, polite speech, and when referring to friends in a slightly more respectful or distant way.
See also: 友達
He is an old friend of mine.
I met a friend from my university days for the first time in a while.
I became friends with many people while studying abroad.
I made a friend at my new workplace.
I had him introduced to my friend.
I got this job through a friend's introduction.
友人 is a general, neutral word for 'friend', whereas 知己 in its second sense implies a deeper, more literary bond of mutual understanding.
友人 is the general, register-neutral word for a friend, while 旧知 adds the nuance of a long-standing, familiar relationship and carries a literary tone.