That is called Eid al-Adha. That is a religious celebration and ritual involves a person sacrificing a goat (sheep, camel, cattle) in the name of God and giving 3/4 of its meat to poor.
Roots of the story is based on the same story which Christians and Jews believe too. Abraham sacrifing his son to God.