The word "single" originally was used to describe a 45 RPM record. Each side could only contain one single song.
The 45 RPM gramophone record was introduced in 1949, a year after the 33 1/3 RPM Long Player, in 1948.
By the early 1950's the word "single" became common, to differentiate from an "LP". In the 1960's, when rock musicians began making albums designed for album-play, the term "single" became a way to distinguish between not only the length of the disk format, but also the type of material. Singles were usually upbeat and designed for radio airplay.
They weren't always the most popular song on the album. Until the mid 1960's, it was customary for singles to not appear on albums, except greatest hits collections. So if you bought the albums, you still needed the singles. That began to change in the mid-1960's, and non-album singles became fairly rare.
The 45 and LP remained the industry standard through the 1980's, when they began to be phased out by compact discs.
Compact discs do not impose a one song limit on a disc, and nor are there A and B sides to the disc. So the term is a bit of a misnomer now, because a "single" is usually released on a single-sided CD with several additional songs. But it still denotes the song chosen for airplay on the radio, distinguishing it from the other tracks.