What am I?

I am taken from a mine and shut in a wooden case from which I am never released. Yet I am used by almost everybody. What am I?