From Latin, sacrificium, i.e., something made sacred.

The primary meaning of the word comes from the practice of just about all theistic religions in which humans would seek favors from a deity by giving it a gift.

This, however, presented a problem: How do you give something to a deity that does not live in the physical world? The problem grows even bigger in monotheistic religions based on the belief there is one God who created everything and owns everything anyway.

The problem is solved by giving something up rather than giving it away. Historically, people did this by taking the best of what they had, for example, the best animal of their herd, or even the best member of the human society, and killing it/him/her on an altar. This practice seems cruel to us today but we really cannot and should not judge the practices of past cultures by our modern standards. To them, it was a very holy act.

The practice of giving something up for religious or spiritual reasons is still common today, though generally it does not involve ritual killing anymore. An example of such a practice would be fasting, i.e., giving up a meal. This is often done at a specific time. For example, for centuries the Catholics used to give up eating meat on Fridays (many still do). Or, they (and other Christians) may give up smoking, or swearing, or candy, during Lent.

The word sacrifice has extended its meaning outside the realm of religion to giving up something for a greater cause. This is perhaps the main meaning of the word sacrifice today: For example, a soldier who dies defending his country is said to have sacrificed his life for his country. Or parents may sacrifice their career for their children when they quit a prestigious or well paying position and get a less prestigious or less paying job which leaves them with more time (or better quality time) to spend with their children.