There are a number of quite separate things, and a currently incomplete plan to make them slightly less separate.
All buildings, including city buildings, industries and player buildings (e.g. depots) have a certain number of job slots, although (e.g. for houses) that number can be zero. All buildings with more than zero jobs are commuter targets. All generated commuting passengers pick their destination from the commuting targets. When a commuting passenger arrives at a building, it depletes the jobs available at that building by 1. This number slowly replenishes with time. When the of available jobs falls below 1, no commuting passengers can start their journey towards that building until the number reaches at least 1.
Currently, there is no connexion between the factory's output and these jobs. It is planned to link them at some point in the future, but that will be a major project.
The remaining numbers are based on the system from Standard, although this has now diverged from Standard: I altered the goods in transit system to make it work better, whereas in Standard, it was abandoned entirely and replaced by Dr. Supergood's "just in time" system.
The in transit numbers now includes goods in transit within a stop, as well as between a stop and an industry. Previously, goods would do this instantly, but, as of to-day's commits, this is now delayed by the time that it actually takes the goods to be hand-carted around the stop and between stop and industry, which, at 1km/h, can take quite a while and can end up with a large number of goods in transit not immediately visible to the player.