If it is accompanied by lyrics, most often associated with the show, it is a theme song.
The phrase theme song or signature tune may also be used to refer to a song that has become especially associated with a particular performer or dignitary; often used as they make an entrance.
The purpose of a theme song is often similar to that of a leitmotif.
The purpose of the music is to establish a mood for the show and to provide an audible cue that a particular show is beginning, which was especially useful in the early days of radio.
In some cases, the lyrics of the theme song provide some necessary exposition for people unfamiliar with the show.
In addition, some theme music uses orchestra scores or original music set mood for the show, such as the Batman: The Animated Series theme song, which was drawn from the theme for the 1989 Batman film created by Danny Elfman and sets the mood for cartoon.
Another example is Ron Grainer’s theme music for Doctor Who.
Other shows use remixes or covers of older songs, such as the theme song of Spider-Man: The Animated Series (1994-1998), which featured a reworked cover of the theme song from the classic Spider-Man cartoon from the 1960s.
The song was performed by Aerosmith lead guitarist Joe Perry.