Dharm:
Dharm is a complex system of Ethics, Duties, and Recommendations. Dharm is a means to attain a goal, when done as described in the Vedas. Activities not described in the Vedas are not Dharm.
Examples of Ethics : Speak the Truth, Practice Ahimsa. These are normally, common to all people. Acts that don't align with the Ethics framework, incur "paap" karma, that in-turn lead to sorrow.
Duties: Duties are more complex as they are segregated by Varna and Ashrama. For example, a Brahmin's duties are different from that of Kshatriya. They are both different from that of a Vaishya. Duties are also segregated by the "Ashrama" of each person. The Ashram's are Brahmacharya, Grihasta, Vanaprasta, and Sanyasa. The duties of a Brahmin Brahmachari are different from the duties of a Brahmin Grihasta. etc. Duties are most intense for Brahmins (and conversely the punishment for non-performance). They are a bit more relaxed for Kshatriya, further relaxed for Vaishyas, and highly relaxed for Shudras and others.
Non-performance of duties incur "paap" karma, that in turn lead to sorrow.
While performance may not have stated benefits, it leads to
Recommendations: These are completely optional, but when performed, bestow the intended rewards to the doer. However, when performed incorrectly, could lead to "paap" karma. For example, donation aka "Daan", when performed as stated in the Vedas, bestow the intended benefits. Some of the things specified in the Vedas, that can be donated include, Gold, Cow, Footwear, and Umbrella. For Daan to be effective, it must be donated in the prescribed procedure, chanting the required mantras, and with the attitude that the item being donated does not belong to the doer.
Karm:
As stated above, doing or not doing one's Dharm, leads to Karm. In the case of ethics and duties, if not performed, the responsible person incurs "paap karma". In the case of recommendations, proper performance leads to "punya" karma that eventually (in some birth) translates to the intended benefits requested by the doer. However, incorrect performance could lead to "paap karma".
Note that, since the Atma that is eternal, takes on a perishable body, in an event we call as "birth". Similarly when the Atma decides to leave the body, we call it "death". After death, the Atma takes on another body and keeps moving thus, from one body to another. Karm is accumulated only when the Atma takes on a human body, because that is when the person becomes eligible to learn the vedas, know about Dharm and Karm, and make decisions that are aligned with Dharm. Each Atma in today's world has taken countless/zillions of births in different bodies - including human, animal, bird, plant, insect etc.
Karm is of three types - Sanchita (Total Accumulated), Prarabdha (A minuscule part of the Sanchita that has started yielding results in this birth), and Aagaami (future karma that we would accumulate in this birth via our acts).
Karm accumulated thus can only expensed in two ways :
1. Experiencing pleasure (punya) or pain/sorrow (paap) - here on earth or in other locations in the Universe (aka svara/naraka loka). Note that the Atma is the experiencer of the effect of the pleasure or pain, but it always needs a "body" through which it experiences it. Therefore a "body" is mandatory in each life.
2. Bhagavan's kindness to cancel part of it. This He does, when the person behaves well in one fine life, and makes himself/herself eligible to receive such pardon/amnesty.
When both Punya and Paap are completely exhausted, the person attains Moksha or Liberation from Samsara.