If you look at what is sound and how it relates to music, the latter is sound, but not all sounds can be characterized by music. The music is characterized by scales and chords, unlike sounds. There are several other aspects of music that help define the different categories of musical sounds.
Sound can be created by different objects by way of vibrations that are set off in the air. Hence, when a door is closed, there are vibrations that are sent as sound waves which travel through the air. Indeed, no sound or music would be created in the absence of air. The plucking of guitar strings leads to vibrations on the soundboard which is heard as sound waves travel through the air. One form of sound is different from another and this is possible by the different waveforms that are created. The shape of vibrations differs and that leads to the creation of different sounds. For instance, when a door is slammed shut, the waveforms are irregular and jerky for which the sound produced is a harsh one. The waveforms of such a sound have big waves at first which then become softer and become smaller waves after which they die away ultimately.
If you look at the waveform that is created by the plucking of guitar strings, it might look similar to that created by a door slamming but there are certain different aspects in both cases. The cycles or waves are regular and continuous, that is created by a guitar string; as a result, the sound we hear is smooth and constant. The difference between non-musical and musical sounds is the regularity of vibrations. This can be made out from the waveforms of both sounds.