A song is a unit of music that is only required to have a start and an end. There are no other rules for songs. Seriously. People also refer to songs as “tunes,” and sometimes “tracks.” Track means something else when recording, so avoid using track to mean “song” around sound engineers or in the recording studio.
A beat is similar, but is never considered a song. Beat makers produce and sell their beats to other artists who will add their own music. By adding some more music to a beat, the artist completes a song.
A demo is sometimes a complete song, but can be a short recording of music that is often shown to a recording engineer before a recording session. Writers often share demos with each other when collaborating. Artists occasionally release their demos because a song can be rewritten or reworked before it’s recorded in the studio.