The Buddha taught that our existence is marked by impermanence, dukkha, and the illusion of self. He wasn't telling us this to make us sad, but to spur us into action. The only permanent thing is "impermanence", but we fail to utterly understand that, and along with the belief we have a permanent, unchanging, and independent "self", we create the actions (Karma) that trap us in the cycle of rebirth which is - you guessed it - dukkha ("suffering"). Through his teachings, he helps us break down the belief in "self", understand impermanence and dependent origination, which helps us change our Karmic actions to ones that don't bind us in rebirth, helps us realize our true peaceful state of Nirvana, and allows us to end Dukkha and the cycle of rebirth.