Answer:
Taken from a mine and then locked up in a wooden case. I am used by students everyday.
What gets whiter the dirtier it gets?
I am black within and red without With four corners round about.
You throw me out when you use me and take me in when you are done. What am I?
you need thousands of me to create a digital image.
Though not a plant, has leaves. Though not a beast, has spine. Though many wouldn't need this thing, It's more valuable than wine.