Both do a good job of reproducing sound. They differ, however, in the way they encode sound and retrieve it for transmission back to our ears. LPs use analog technology. They capture and reproduce sound in a way similar or analogous to how it was originally created.
All sounds begin with vibrations.
In music, for example, the instruments vibrate the strings of a guitar, the reed of a clarinet, the head of a drum. These vibrations create disturbances in the air, which we hear as sound. To make an LP, air vibrations are changed into electrical signals by a microphone. These then activate a tool that carves the pattern of the vibrations into the LP as tiny notches in the side of a groove. Etched in the same pattern in which they moved through the air, they are analogous to the original sound wave.