This one is a rule for learners of English to remember when talking about public transport. The rule is use ‘in’ for private transport and ‘on’ for public. “I saw Nicola pass me in her car while I was on the bus.” The exception is bicycles, of course, which you can never be ‘in’ (unless you are a tiny tube monkey). And you go ‘by’ both.
Poor students! They seem so natural to us native speakers, but English prepositions are many, and knowing which to use, when, is down to practice rather than studying the rules.