According to the Manusmriti, ahimsa is the foremost among the dharmas that are common to all. It is included in the yoga of mind control. Ahimsa means much more than non-injury; it implies not doing harm to others even by thought or word.
By nature none of us wants to cause any hurt to other people. But if others do us harm we want to retaliate in anger. Suppose one of our children sets fire to our house in all innocence. We do not punish it but try to extinguish the fire and thereafter take care to see that the child is kept away from fire and other dangerous objects. We must learn to think that all those who cause us pain are like this child. If a person tries to hurt us, we must lovingly prevent him from doing so. We must not bear any ill-will against him nor think of retaliating. This is true ahimsa.
The practice of ahimsa contributes greatly to the yoga of mind control. The mind is like a demon. But see what wonders the demon- the vetala- accomplished for Vikramaditya after he had been brought under control. The mind will do us unlimited good if it is made subservient to us. Anjaneya [Hanuman] acquired his immense strength and was able to perform so many great and good deeds only because he had conquered his mind. The mind's power is immeasurable. All the cosmos is the work of the Supreme Goddess and in this creation of hers even the mind of a tiny ant pervades the entire universe.
Many great men, many yogins, have stated that they were able to control their minds by adhering to true ahimsa. When we practise ahimsa, anger will naturally give way, the mind will become clear and will easily be controlled.
Though the chief aim of non-violence the control of the mind, there is another unexpected benefit that it brings. It is called "avantara prayojana". All of you came to the Matha to see the puja. But with that you listened to the nagasvaram music and saw persons whom you had not seen for long - and now you listen to my discourse. All these belong to the category of avantara prayojana. Thus if a man practises true non-violence (by body, mind and speech), he will be rewarded with a benefit that he had not expected. In his presence all creatures will forget their ill-will and cease to cause hurt to any other creature.
tatsannidhau vairatyagah -yogasutra.
-- Yogasutra, 2. 35
The minds of even cruel people will be transformed in the presence of men practising utter ahimsa: in other words when a man is full of love he can make other people also loving and this is an avantara prayojana.
A sannyasin must observe total non-violence. He must not even pluck a leaf from a tree and must not do violence to plants by cooking them. It is because of the rule of absolute non-violence enjoined on him that there is an interdiction on his performing rites in the sacred fire. Tending a fire for the conduct of a ritual might unwittingly make us responsible for the destruction of some insects. It is because the sannyasin has no Agni ceremony that when he dies his body is not cremated but interred. When he is initiated into sannyasa he takes a vow that he shall never be the cause of fear to any creature.
"Ahimsa paramo dharmah" (Non- violence is the supreme dharma). Buddhism and Jainism impose total non- violence on their followers. Not so our religion except in the case of ascetics. In Hinduism an exception to the general dharma of non-violence is made in the case of a righteous or just war and in a sacrifice in which sometimes animals are killed. It is to fetch the divine powers to earth and to appease them that animals are sacrificed in yajnas. It is our belief that the animals so sacrificed will attain to a high state that they cannot otherwise through their own efforts. Altogether it means the good of the animals and the welfare of the world.
In a war, heroes of the army sacrifice themselves in the cause of the nation. Is it not better to lay down one's life for the sake of others than fatten oneself doing nothing?
It is easy to claim oral allegiance to the principle of non- injury but difficult to practise the same. Quarrels and disputes are inevitable in the workaday world. In dealing with them action that is apparently violent may have to be taken. In reality such action is not regarded as violent. The intention or purpose is important here, not the action itself. Certain types of violence are justified according to the sastras and not considered sinful, because such violence is committed not for our personal delight but in pursuance of our duty towards the society: the offering of an animal in sacrifice, sentencing a murderer to death, killing an enemy in war.
If a religion makes the practice of non-violence universally applicable, there will be problems. Obviously, all cannot practise it at all times. So those who find it not practicable to follow these rule of ahimsa are made liable to sin. Our religion has taken a more realistic view on the question. As we have seen, Buddhism imposes total non- violence on its followers. But what do we see in practice? In all those lands where Buddhism has a hold there are armies that take part in fighting. Besides, almost without exception, everybody is a meat-eater there.
If a great dharma or principle is made common to all, in the end it is likely to lead to a situation in which no one will respect it in practice. In our religion- to repeat- the rule of absolute non- violence is meant only for sannyasins. Following their example, Brahmins, Vaisnavas in regions like Gujarat and Sivas in the South like the Vellalas and Komutti Cettis practise ahimsa. Without being bound by any sastric injunction they have voluntarily adopted the principle and practised it from generation to generation. Influenced by the example of the sattva guna of ascetics these communities have become vegetarians on their own. And, following their example and without being compelled to do so, other castes too abstain from meat on days likes the new moon, on the day of a sraddha, and days sacred to the various deities. When a principle is imposed only on a few, since it is difficult to make it universal it becomes an ideal for others to whom it may not formally apply: they try to practise it as far as they can. Non-violence is a samanya dharma( a dharma common to all) in Hinduism. It is kept as an ideal though, on occasion, adherence to it is not practicable.
In the Vedic dharma the definition of ahimsa is the absence of ill-feeling in all action.
For a general background, please see here