Hi, Broadly speaking, the phrase means 'another I'. With your buddy example, the idea is that your buddy is almost like you and almost always with you. This is the most common use, I'd say.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.