Karma derives from the sanskrit for action, and in Hinduism, it also refers to the results of action.
The law of karma posits that one's actions lead to certain results, and that it is advantageous to perform those actions that lead to beneficial results, and disadvantageous to perform those actions that lead to harm, loss or spiritual retardation.
Unlike in the Abrahamic traditions, this is seen less as a right-wrong, good-bad, divinely approved-disapproved choice, than as a conformation to natural law. Eg: hold a large rock directly above your foot, release it -- and your foot will be crushed. This is simple physics. Herd Jews into a gas chamber and your spiritual progress will be harmed -- again, simple, impersonal physics, and bad karma both.
Right and wrong are not manifestations of divine approval or disapproval, but, rather, of physics; of celestial mechanics. Good = physically/spiritually beneficial. Bad = physically/spiritually harmful.
Dharma, strictly translated, means something like "duty." It is the action or lifestyle proper (ie: most beneficial) to your station in life, ie: your varna and jati -- in Western terms your 'Caste'.
Your dharma is your life's blueprint. You are born with it. It is the predetermined lifestyle, rulebook and outline of proper conduct -- dictated by your past actions (karma) -- that will result in the optimum benefit, (spiritual advancement), in this particular incarnation.
The dharma of one person may be completely different from the dharma of another. The duty of a soldier is not the duty of a pacifist. The duty of a deer is not the duty of a tiger is not the duty of an oak tree. Their birth has dictated different lifestyles for them, and attempting to follow the other's dharma -- however well managed -- is likely to be physically and spiritually budensome.
Moksha, in Hinduism, is usually described as release from the cycle of birth and rebirth.
Analogy: When you sleep, you experience successive stages of dreaming (REM) and deep (dreamless) sleep. In the morming you wake up and the cycle ceases and you realize it was all an illusion.
Hinduism believes that this life is, in fact, a dream, and that we cycle through successive dreams (lives), till we eventually 'wake up' ie: achieve nirvana/enlightenment, and realize that all our lives were, in fact, no less illusory than our dreams during sleep-state consciousness.
This waking we call Nirvana or Samadhi. The cessation of sequential life-dreams we call Moksha.