1. rest.
2. Make sure you are wrapping your hands correctly.
3. Get some decent bag gloves.

when you make a fist the two knucles with a flat surface are the little and ring finger. So some people reckon it's better to hit with that area, also to hit with those knucles your arm/wrist straightens. Some say the first two fingers as it's a larger surface and they tend to move less. BUT if your hand is wrapped well the bones in your hands shouldn't be shifting about.

Y'know it could be a matter of your body getting used to the impact. When I first started I hand pains in my hands and wrists. Items 1,2&3 sorted it out. Also had that grinding thumb feeling for a while, that was gross.