Sound is wave, you can imagine it as a line on a graph.
Think back to school, you remember that lesson where they drew little rectangles under a curve?
They said that the more rectangles you drew the more closer all the rectangles would match the curve.
Well digital audio does that.
The sounds moves a magnet a tiny bit, they record how far the magnet is pulling.
This forms one box under the sound curve.
Now they just have to make several tens of thousands of boxes for every second of music.
For example, a CD has 44,100 of those boxes for every second.
For the human ear that’s close enough to the real curve that we recognize it as sound.