I just got back from picking up a friend at the station.

Literal

Friend [object-を] greet [purpose-に] station [up to-まで] went-and-came-back point is.

まで here marks the station as the endpoint of the trip — 'went as far as the station.' Combined with 行ってきた (round-trip) and ところだ (just now), it paints a complete picture: departed, picked up the friend, and just returned.