A kage (literally: "shadow") is a leader of one of the five most powerful hidden villages within each of the Five Great Shinobi Countries:
- Hokage ("Fire Shadow") of Konohakure ("Hidden Leaf Village") in Hi no Kuni ("Land of Fire")
- Kazekage ("Wind Shadow") of Sunagakure ("Hidden Sand Village") in Kaze no Kuni ("Land of Wind")
- Mizukage ("Water Shadow") of Kirigakure ("Hidden Mist Village") in Mizu no Kuni ("Land of Water")
- Raikage ("Lightning Shadow") of Kumogakure ("Hidden Cloud Village") in Kaminari no Kuni ("Land of Lightning")
- Tsuchikage ("Earth Shadow") of Iwagakure ("Hidden Rock Village") in Tsuchi no Kuni ("Land of Earth")
In general, the current kage picks his/her successor when he/she retires. If the kage dies before picking a successor, the daimyō of that country (e.g. Hi no Kuni Daimyō / Fire Daimyō) will pick the successor.
Since each active kage is considered the strongest shinobi of their village/country, that's how they are chosen (also taking into account wisdom and character, of course, which are also considered qualities of a great shinobi). So each kage would likely retire when they decide they are no longer the strongest ninja of their village/country and thus no longer the best suited for leading and protecting their village and country.
If the active kage dies, and the previous kage once again becomes the strongest shinobi of the village, then they would naturally come out of retirement and resume their duties. Otherwise, they would pick the next successor.