Slaughtering an animal can be defined as killing or butchering of animals for food . The history of slaughtering can be traced back in Islam as early as the time of Prophet Ibrahim when he was commanded by Allah to slaughter his own son, Prophet Ismail but later replaced by sheep as revealed in Surah al-Saffaat 37:101-107, which can be translated in English as “So We gave him the glad tidings of a forbearing boy. And, when he (his son) was old enough to walk with him, he said: ‘O my son! I have seen in a dream that I am slaughtering you (offering you in sacrifice to Allaah). So look what you think!’ He said: ‘O my father! Do that which you are commanded, In sha’ Allaah (if Allaah wills), you shall find me of As-Saabiroon (the patient).’ Then, when they had both submitted themselves (to the Will of Allaah), and he had laid him prostrate on his forehead (or on the side of his forehead for slaughtering); We called out to him: ‘O Ibraaheem! You have fulfilled the dream!’ Verily, thus do We reward the Muhsinoon (good-doers). Verily, that indeed was a manifest trial. And We ransomed him with a great sacrifice (i.e. a ram)” . These ayat is the evidence that slaughtering for the sake of Allah is an act of obedience towards Allah, allowed and recommended in Islam.
There are different conditions that slaughtering can be done in Islam which includes Udhiyah, Aqeeqah, and Hady.
Different types of slaughtering
The Hady is legally edible animal brought to the Sacred Mosque, slaughtered there, and sacrificed for the sake of Allah by those who perform umrah in the month of Hajj (Hajj at- Tamattu and Al Qiran) if he can afford it.
Surah Al Baqarah 2:196
Where else, Udhiyah is legally edible animal slaughtered and sacrificed on the Day of Sacrifice or the Days of Tashriq for the sake of attaining the closeness and the pleasure of Allah . The slaughtering of a sacrificial animal for the newborn as a sign of gratefulness to Allah is known as Aqeeqah . Edible animals are also slaughtered by pronouncing Allah’s name to be eaten in our daily lives.
The practice of slaughtering has been done as early as the time of Prophet Ibrahim as mentioned earlier. Udhiyah is an act of worship, to draw closer to Allah that is being done after Eid prayer on Eid al Adha. It is prescribed in the Quran and the Sunnah of His Messenger (peace and blessings of Allaah be upon him), and according to the consensus of the Muslims. Among the evidence from the Quran about it is in surah al-Kawthar 108:2, Allaah says (interpretation of the meaning): “Therefore turn in prayer to your Lord and sacrifice (to Him only)”. The hadith that mentioned about the relevance of the practice of Udhiyah is that a hadith narrated from al-Baraa’ ibn ‘Aazib (may Allaah be pleased with him) that Prophet Muhammad (peace and blessings of Allaah be upon him) said: “Whoever offers a sacrifice after the prayer has completed his rituals (of Eid) and has followed the way of the Muslims.”  Prophet Muhammad (peace and blessings of Allaah be upon him) offered sacrifices, as did his companions (may Allaah be pleased with them). And he said that sacrifice is the way of the Muslims. Therefore it is prescribed in Islam and it is a way that all Muslims should follow and relevant to Muslims until today. The majority of scholars are of the view that it is Sunnah mu’akkadah. It means to sacrifice an animal is a prescribed sunnah. Shaykh Muhammad ibn ‘Uthaymeen (may Allaah have mercy on him) said a person should offer the sacrifice on behalf of himself and the members of his household.”
With regard to Aqeeqah, it is done for a newborn. The scholars of the Standing Committee agreed that it is also Sunnah mu’akkadah. Many ahadith mentioned about the virtues of aqeeqah and its relevance as a way of Muslims. Among others includes a hadith narrated from Salmaan ibn ‘Aamir al-Dabbi that said: I heard the Messenger of Allaah (peace and blessings of Allaah be upon him) say: ‘Aqeeqah is to be offered for a (newly born) boy, so slaughter (an animal) for him, and remove all dirt from him.” Another important hadith mentioning about the importance of Aqeeqah and the needs for it to be done by Muslims is a hadith narrated from Samurah ibn Jundub that the Prophet (peace and blessings of Allaah be upon him) said: “Every child is in pledge for his aqeeqah, which should be sacrificed for him on the seventh day and his head should be shaved and he should be given a name.” 
It was said that the meaning of it is that if the aqeeqah is not done for him and he dies in childhood, he will be prevented from interceding for his parents; or that the ‘aqeeqah is a means of ridding the child of the Shaytaan and protecting the child from shaytan.
The slaughtering to show gratitude towards Allah
Besides the above-mentioned reasons for slaughtering to be done, we as a Muslim can slaughter an animal as a sign of thanksgiving to Allah for the blessing that Allah has bestowed on us, for the sake of Allah only. For example, we slaughter an animal for Walimah, to thank Allah after moving to a new house or coming back from a journey like when Prophet Muhammad (peace and blessings of Allaah be upon him) came back from a journey he would sacrifice a camel and invite the people to eat. 
To fulfill the requirement for slaughtering to be accepted as an ibadah towards Allah, the basic principle with regards to slaughtering an animals in all the different situations and cases mentioned, saying “Bismillah” must be done for each individual animal with the intention of slaughtering it in the proper manner as thought by Prophet Muhammad (peace and blessings of Allaah be upon him).
In conclusion, slaughtering an animal in Islam for the different situations mentioned above is relevant in the life of a Muslim since long time ago until today for the sake of Allah (ikhlas) as a worship towards Him and to be done in the manner thought by our beloved prophet (peace and blessings of Allaah be upon him) (ittiba)to gain rewards from Him.
 Chapter 10, A summary of Islamic Jurisprudence Vol 1 , Dr. Salih Al Fawzan.
 Chapter 11, A summary of Islamic Jurisprudence Vol 1 , Dr. Salih Al Fawzan.
 Narrated by al-Bukhari, 5545.
 Narrated by al-Bukhari, 5154
 Narrated by al-Tirmidhi, 1522, he said it is hasan saheeh; Ibn Maajah, 3165; Saheeh Ibn Maajah, 2563).
 Narrated by al-Bukhari, 3089