Think of a piano roll in a DAW. The MIDI file does not contain sound; it contains instructions: "Play note C4 at volume 70 for 2 seconds." The Soundfont is the box of instruments. When the MIDI player reads the instruction for "Cello," it grabs the "Cello" sample from the Soundfont and plays it at the correct pitch.