Varnashramadharma, is three words in one. Varna is your caste, Ashrama is your life stage and dharma is your religious duty. The whole words translates to mean, your duty depends on your life stage and your caste.
And if you follow your caste duties, follow your life stage and complete your religious duties it will bring you happiness. then your happiness makes you do good duties which builds up good karma, which means you will have a better re birth (Samsara). Samsara is a constand struggle to perfect a persons soul so then it will receive MOKSHA. Moksha means release, it is the most important goal for Hindus. It represents spiritual perfection in which a persons soul is completely united with God.