A songwriter is someone who writes the music for songs. The word also implies that the same person has written the lyrics, although this is not always the case. A songwriter is said to engage in the practice of song writing.
The word is used most usually when talking about popular songs, although is sometimes used when talking about art songs as well; it is true to say that Franz Schubert, for example, was a songwriter, even if it isn't something which is said very often.
Songwriters may sing the songs they write themselves, or may write for somebody else to sing. People who sing their own songs are nowadays typically called singer-songwriters, although the tradition of doing this dates back hundreds of years. It is often speculated that pre-historic man must have made up and sung songs. More recently, the troubadors of the middle ages sang their own work, as did the German Minnesingers.
Most art song writing is written for somebody other than the composer to perform, although it is known that Schubert often sang his own songs at private parties, and there have been a number of composers who were also singers and wrote for themselves, Carl Loewe being one example.