The theme music for most anime tends to be catchy songs deliberately written for release to the pop/rock music market, if they aren't already actual pop/rock songs. One reason is simply that anime provides an easy way for both hit and entry J-pop/J-rock artists to get more exposure and good lateral promotion. Platinum J-rock bands like L'Arc~en~Ciel and Orange Range frequently release their new songs along as themes in anime that are on the air at the same period as their respective singles or albums.
Another reason this is done is because many seiyuu (voice actors) are also singers, often the more successful ones. (At least one such performer, Megumi Hayashibara, is both a formidable presence on Japanese pop charts and an internationally-known talent, as well as the recipient of more star and featured anime roles than any one person ought to have. Moving into the early 21st century, Nana Mizuki is showing every sign of following in Megumi Hayashibara's footsteps here.) It's not unknown for production companies to organize some of their principal cast members into groups for recording CDs—the "Goddess Family Club" (Ah! My Goddess), DoCo (Ranma ½), the Maho-Dou (Ojamajo Doremi) and the Spirit Singers (Digimon Frontier) all come to mind. Either way, it's usually to a seiyuu's advantage—they perform theme songs (as well as additional "character" songs), receiving a double benefit from exposure in two different markets (and the additional profit).
A third reason is that TV theme songs are the pinnacle of Japanese musical success. If a Japanese artist/group makes a hit album, the studio takes almost all of the profits. If the same group makes an album as a TV tie-in, the musicians themselves receive a much larger cut.
As a result, many anime theme songs have little to do with the subject matter of their shows. Many are romantic songs of one flavor or another, ostensibly showing the point of view of one of the show's main characters. (This isn't limited to Shojo or Josei - there are plenty of cases of effeminate love songs being used for Shonen anime.) Alternately, they may be Thematic Theme Tunes, reflective "personality" pieces, nonsense patter songs, or instrumentals.
Whatever their style and content, though, anime theme songs are generally written and performed with the same attention and care that in the United States is reserved for potential Oscar-winning compositions. Quite a few can reach Ear Worm status - one example, "Hare Hare Yukai" from Suzumiya Haruhi, has been wildly popular as both a song and a dance at American and Japanese conventions.
When an anime reaches the American and International broadcast market (as opposed to direct DVD sales), their theme songs are often either shortened or changed entirely. When a broadcaster even bothers with new credits (Toonami and other outlets are notorious for not bothering to do so), a vocal performance may replaced with unimpressive instrumentals; a case in point would be Vision of Escaflowne, whose beautiful and stirring love song was unceremoniously dumped in favor of a bland, generic "adventure music" opening. Other times the original melody is kept (perhaps with a little modification), and new English lyrics unrelated to the original are written for it; an example of this would be Sailor Moon, whose theme, "Moonlight Densetsu", was turned into a standard Western character introduction theme.
On the other hand, some importers have tried to create local language versions of theme songs faithful to the original Japanese lyrics, with mixed results. Difficulties have included license constraints on North American distributors from Japanese parent corporations, and the problem that American voice actors are rarely trained singers - as Viz's famously bad attempt to create "DoCo America" proved. In the late 1970s, Uchuu Senkan Yamato's theme was dubbed reasonably well, even allowing for the changes that turned the series into StarBlazers, and the same was done in the 1990s with some of the themes from Ranma ½. Pioneer (later known as Geneon) sometimes did the same in following decades, even going so far as to release full English-language CDs for some of their imports. Recently[when?] Funimation has revived the practice, with mixed results. Mexican and Chilean dubs of anime have also translated some songs, often with good results; the Latin Spanish versions of Dragonball Z and You're Under Arrest themes are as memorable and loved as the originals.
Very rarely, a replacement theme will prove to be more appropriate for English audiences (the Toonami run of Gundam Wing's replacement of "Just Love" with this being the most famous example). When this is successful, it's generally because the new theme stays more in step with English viewers' preconceptions of a series' tone.
One other thing of note concerning theme songs for anime: where in the United States a theme song is usually a vital part of the identity of a show, anime often change both opening and closing theme songs on a regular basis. The best example of this would be (again) Ranma ½, which had a different set of theme songs for each of its seven seasons and for its OVA series. Another good example is One Piece, which has (thus far) 15 openings and 18 endings in 530 episodes, or Detective Conan, which so far has a whopping 28 openings and 35 endings.
The original lyrics to an anime theme song may be the occasion for Gratuitous English—the number of examples where English words and phrases are used instead of Japanese equivalents is vast. "Treat Or Goblins", the theme from Magical Shopping Arcade Abenobashi, contrasts Megumi Hayashibara's attempt at half-English hiphop with an all-English rap by an obviously American performer. (Rental Magica plays with this, having two opening themes, both sung by Lisa Komine and using the same tune - "Sora ni Saku" in Japanese for 14 episodes, and "Faith" in English for 10 episodes.) In a few cases, the song is actually written mostly or entirely in English and performed at least in part by native English speakers -- "Duvet", the theme from Serial Experiments Lain, "Obsession" from .hack//Sign, and "The Other Side of the Wall" from Princess Principal are good examples. One reason production companies may be doing this is to shortcut around the tendency, noted above, for American importers to ditch Japanese theme songs.
This doesn't just apply to just anime. Various video games from Japan will also have anime theme songs that's used in openings, endings, cutscenes (best example being "Suteki da Ne" for Final Fantasy X), and commercials to promote both singer(s) and game. Usually, the song is released by the artists before the games are and have no actual ties to it, but occasionally the song will be written with the specific game in mind.
This page is example-less, as the trope is omnipresent. Potential sub-tropes are, naturally, a different story.
See also Image Song.