Controlling a motor with arduino and H bridge and external power supply
The USB connection provides 5V or 3.3V power for the Arduino. The 9V battery provides power to the H-bridge, which drives the motor. The connection between the two sources is made with the H-bridge chip using transistor driver circuits.

This is a basic H-bridge:



V+ is 9V. The P-channel FETs require ~9V gate drivers to turn off, while the N-channel ones may only require a 5V signal to turn on. In reality, then both likely have similar transistor driver circuits, both of which only require 5V inputs, which the Arduino provides, to fully react.

The parts indicated in the tutorial, SN754410 or L293, are half H-bridges and use BJTs, otherwise known as push-pull drivers. They only have the connection on one side of the classic H-bridge (one NPN, one PNP).