MIDI sync is all about having MIDI gear follow the same clock/time code signal.
One device will send the clock/time code signal and the other devices will follow and run in sync.
If machine A (called the master) provides the MIDI clock signal to machine B (called the slave) then the two will be working in sync, so if the tempo of machine A changes then so does the tempo in machine B.