It is the direction that is toward the original authors or maintainers of software.
It is usually used in the context of a version, a bug, or a patch.
Upstream development allows other distributions to benefit from it when they pick up the future release or merge recent (or all) upstream patches.
[1] Likewise, the original authors (maintaining upstream) can benefit from contributions that originate from custom distributions, if their users send patches upstream.
The term also pertains to bugs; responsibility for a bug is said to lie upstream when it is not caused through the distribution's porting, non-upstream modification or integration efforts.