The theme music of a radio or television program is a melody closely associated with the show, and usually played during the title sequence and/or end credits. If it is accompanied by lyrics, it is a theme song.
The purpose of the music is to establish a mood for the show. In same cases, as with The Brady Bunch and Gilligan's Island, the lyrics of the theme song provide some necessary exposition for people unfamilar with the show.
Theme music has been a feature of the majority of television programs since the medium's inception, as it was for the ancestral radio shows that provided their inspiration. Programs have used theme music in a huge variety of styles, sometimes adapted from existing tunes, some composed specifically for the purpose. A few have been released commercially and become popular hits; the theme tune to Friends, "I'll Be There For You", was a hit for The Rembrandts.
Other themes, like the music for The Young and the Restless, Days of Our Lives, and Coronation Street have become iconic mostly due to the shows' respective longevities. Unlike others, these serials have not strayed from the original theme mix much, if at all, allowing them to be known by multiple generations of television viewers.
Virtually every TV show has specific, melodic theme music, even if it's just a few notes. One famous exception is 60 Minutes, which features only the ticking hand of a Heuer stopwatch.
Some series use major hit songs that were popular before the shows' creation. The most famous example is the CSI franchise which each series having a well known song by The Who for their theme song.
Radio programs with notable theme music include Just a Minute, which uses a high-speed rendition of the Minute Waltz by Frédéric Chopin.