to an old friend昔の友達 means “an old friend,” and に marks the person encountered, contacted, or otherwise directed toward. In these examples, it commonly appears with 会う or 出会う, meaning “run into an old friend.”
JA: 駅で昔の友達に偶然会った。
EN: I happened to run into an old friend at the station.