If your general loses a fight, he retreats to heal. Healing time depends on a general’s level (the higher level - the more time it takes to recover fully). You can speed up the healing process with diamonds, though.
A general who is simply in tavern (not defending the city or marching with an army) does not give any bonuses to the city or an army.