A very good and succinct explanation by Geshe Tashi Tsering in his book The Buddha's Medicine for the Mind: Cultivating Wisdom and Compassion:
"Intention is the most important of all mental events because it gives direction to the mind, determining whether we engage with virtuous, non-virtuous, or neutral objects. Just as iron is powerlessly drawn to a magnet, our minds are powerlessly drawn to the object of our intentions.
An intention is a mental action; it may be expressed through either physical or verbal actions. Thus, action, or karma, is of two types: the action of intention and the intended action. The action of intention is the thought or impulse to engage in a physical or verbal act. The intended action is the physical or verbal expression of our intention. Karma actually refers to the action of intention but in general usage it includes the intended action and the seeds that are left in the mind as a result.
How do we accumulate karmic seeds? Every physical and verbal action is preceded by mental activity. Goodwill motivates a kind gesture; ill will motivates nasty words. Ill will is the intention to cause mental, emotional or physical harm. Thus, before and during a bad action, ill will is present in our mind. The presence of ill will before and during this act has an impact and influence on the mind due to which a certain potential is left behind. This potential is a karmic seed, a seed planted in our mind by physical, verbal or mental action. The strength or depth of this seed is determined by a number of factors, including how strong our intention is, whether we clearly understand what we are doing, whether we act on our intention and whether the physical and verbal action is completed.
Seeds will remain in the mind until they ripen or are destroyed. Seeds left by negative mental events and actions can be destroyed by the four opponent or antidotal powers. The most important of these four powers are regret for the negative act and a firm resolve not to act that way again in the future. Seeds left by positive mental events and actions can be destroyed by anger.
Even if we do not act on a negative intention, a karmic seed of diminished potency is still left in the mind. This incompleted seed is easier to remove. If it is not destroyed, a negative seed will eventually produce an unpleasant and negative effect while a postive seed will produce a pleasant and positive effect. Karmic seeds do not go to waste even after one hundred aeons. They will come to fruition when the time comes and the conditions assemble.
Actions motivated by the wish to attain Buddhahood for the benefit of all sentient beings and dedicated to that end have a special feature. The positive effects of such an act will be experienced many times over without being exhausted. For this reason, virtue dedicated to complete enlightenment is likened to a magnificent tree that bears fruit every season without fail. Such virtues will bear fruit until Buddhahood is attained."
A fragment of the The Sutra of the Causes and Effects of Actions by Shakyamuni Buddha, from Lama Yeshe Wisdom Archives that probably conveys the idea very straight-forward:
"Then the Buddha spoke to Ananda thus, “This question that you are asking--it is all on account of a previous existence, in which every one’s mind was not alike and equal. Therefore, in consequence, the retribution is of a thousand and a myriad separate and different minds.
Thus the person who in this world is handsome comes from a patient mind, and the ugly comes from amid anger; the needy come from meanness.
The high and noble comes from prayer and service, and the lowly and base comes from pride.
The great and tall person comes from honor and respect and the short-legged person comes on account of contempt.
The person who hinders the bright splendor of the Buddha is born black and thin; and the one who tastes the food of the fast is born deprived of food.
The person who is too sparing of fire and light is born infirm; the one in whose eyes fault always appears is born night-blind.
The person who slanders the Law is born dumb; and the person who does not want to hear the Law is born deaf. .....
The person who is compassionate is born long-lived, and the one who kills living beings is born short-lived.
The one who gives gifts is born rich.
The one who gives a gift of horse and carriage to the three jewels has many horses and carriages.
Then the person who reads and asks about the sutra is born intelligent; but the stupid person comes from an animal existence.
The person who cannot stay in his place comes from among the apes; the one who binds the hands and feet of living beings is born paralyzed in hand and foot.
The person who is of evil passions comes from snakes and scorpions; the one who keeps the precepts (sila) is complete in the six kinds of organ, but the person who breaks the precepts is incomplete in the six kinds of organ.
The unclean person comes from the existence of pigs; the person who likes song and dance comes from among actors. The one who is greedy comes from dogs; the one who eats alone, their neck is goiterous.
The one who castrates living beings has incomplete pudenda; the one who on one side abuses his superior has a short tongue.
The one who seduces the spouse of another, after dying falls among the geese, and a person who commits incest will fall into the existence of sparrows."