Your hand may be broken or badly sprained, you should have it xrayed immediately. You can make a splint with cardboard and tape to stabilize it to minimize the pain until you get to the doctor.
If you can move it, it's not broken. If you cannot move it and it kind of just dangles then it's probably broken. It's possible to fracture or sprain it.
My hand hurts and i can move my fingers but it hurts really bad i hit it on a door handle i know it sounds wierd but i hit the brass handle right up against my bone. my fingers feel stiff but it just might be badly sprained any ideas.