Waka is a form of Japanese poetry also known as Yamato Uta (songs) or '31 letters'.
Tanka poetry is one branch of waka. Already in the Nara or early Heian periods, the 'Manyoshu' ('Collection of a Myriad Leaves'), had been compiled consisting of tanka. In the Heian period, nagauta and sedoka poetry lost their popularity and waka came basically to mean tanka.
Tanka consist of 5 phrases of 5,7,5,7,7 words each or 31 letters. This is the only rule for tanka; there are no others. You can choose whatever topics you like, for example, daily life, nature, etc.
Tanka has various forms that enable the expression of a wide variety of feeling. Set epithets may be put in front of some special word; puns may be used using homonyms, words with the same pronunciation, but different meanings.
People will continue to compose Waka poems that will change as the use of words change, too.