How it works
Here に (with) marks the person you meet — 会う (to meet) takes に (with) for its partner, not を (object). The verb is in casual past 会った (met) from 会う (to meet). No polite ending and no spoken "I," so it reads as a relaxed "I met a friend."