Everything is just vibrations; vibrations are just waves. Vinyl records make a physical copy of the sound wave. As the needle drags across it at the correct speed it starts vibrating, reproducing the sound that went into the groove in the first place.
Sound files are more tricky: Basically you need to measure the wave as it goes up and down, store it into a file, and then have a computer convert it back into vibrations with the help of a loudspeaker. The more times you measure the sound wave per second, the better quality your recording will be.
As we know that sounds are waves, it's not so hard to imagine a text file containing sound. Below is a very simple wave form represented with numbers:
- _ - ⁻ - _ - ⁻ - _ - ⁻ - _ - ⁻ - _ - ⁻ - _ - ⁻ - _ - ⁻ - _ - ⁻ - _ _ - - ⁻ ⁻ - - _ _
1 0 1 2 1 0 1 2 1 0 1 2 1 0 1 2 1 0 1 2 1 0 1 2 1 0 1 2 1 0 1 2 1 0 0 1 1 2 2 1 1 0 0
In theory, a computer could convert this into sound. It would sound awful.