It has to have a potential to use a cube. It then resets the potenial.
Say an earrings pot is +2luk and +2 int. You can cube it to reset the potential. So, it might end up like 6% int and 6% luk.
You have to use it on an item that already have potential stats shown and the miracle cube would change those stats but not the lines. Potential can be made with potential scroll on item that don't have potential or out the ground with potential.
First, you buy the cube. Then, you double click it so it will transfer to your inventory. After that, leave the cash shop and double click the miracle cube. Drag an item WITH potential into the little dotted box. Press okay. Get crap. Feel bad for yourself. Not much to it, really.