The Buddha taught that the nature of reality was impermanent and interconnected. We suffer in life because of our desire to transient things. Liberation from suffering may come by training the mind and acting according to the laws of cause and effect i.e. with right action, good things will come to you.
Source
http://www.spaceandmotion.com/buddhism-hinduism-taoism-confucianism.htm