das Lied
song
A piece of music with lyrics that is intended to be sung.
Im Radio spielten sie mein Lieblingslied.
They played my favorite song on the radio.

song
Loading your saved state.
song
A piece of music with lyrics that is intended to be sung.
Im Radio spielten sie mein Lieblingslied.
They played my favorite song on the radio.

A song can not only be 'singen' (sung) or 'hören' (heard). You can also 'schreiben' (write) it, meaning the lyrics, 'komponieren' (compose) it, meaning the music, or 'spielen' (play) it on an instrument.
Die Band hat für das Konzert ein neues Lied geschrieben.
The band wrote a new song for the concert.
The idiom 'ein Lied davon singen können' means that you have a lot of experience with something, usually something negative. The person who has the experience is the subject of the sentence.
Wer oft mit dem Zug fährt, kann von Verspätungen ein Lied singen.
Anyone who often travels by train knows all about delays.
'Lied' (song) is the base for many compound words that describe the type of song more precisely. Examples are 'das Schlaflied' (lullaby), 'das Liebeslied' (love song), 'das Volkslied' (folk song), or 'das Weihnachtslied' (Christmas song).
Jeden Abend singt sie ihrem Kind ein Schlaflied vor.
Every evening she sings her child a lullaby.
When talking about a song, certain vocabulary is useful. A song usually consists of 'Strophen' (verses) and a 'Refrain' (chorus). The lyrics are called 'der Liedtext' and the music 'die Melodie' (melody).
Dieses Lied hat eine sehr eingängige Melodie und einen einfachen Refrain.
This song has a very catchy melody and a simple chorus.
music
'die Musik' and 'das Lied' both belong to the area of sounds, melody, and rhythm. 'Musik' is the broader term: it can mean classical music, pop, background music, or music without singing. 'Lied' is more specific and means a piece of music with lyrics that can be sung. Learners may confuse the words because a song is, of course, music. But not all music is a song. When you are speaking generally about listening or playing, 'Musik' usually fits. When you mean a single sung piece, 'Lied' is more precise.

Ich habe für die Feier ein altes Lied ausgesucht, das alle mitsingen können.
I chose an old song for the celebration that everyone can sing along to.
Beim Kochen hört die Fahrerin gern ruhige Musik.
The driver likes listening to calm music while cooking.