Remove the pads and then take a toothbrush and some brake fluid and clean up the exposed part of the pistons. Once you are happy they area clean all the way round and don't have any rust on them, push them all the way back into the caliper.
Then put the pad back in and push the brake pedal repeatedly till it goes hard again, take out the other pad and repeat.
Do the other caliper - job done.
You may find you have a very stuck piston, sometimes you need to take the pad out and put something in between the piston and the disc that is slightly thinner than the pad, then hit the brakes to push it out, make sure you put something in place though or you can push the pistons right out.
If there is corrosion on the piston and you push it back into the caliper you run the risk of creating a leak if the seals get a bit chewed on the way in. Even if this is the case, you can get away with pushing them back a little to free them up a bit.
Get some red rubber grease, pack lots of this in around the pistons to protect them, NO other grease as it will eat the rubber. ONLY brake fluid, and red rubber grease should some into contact with the seals.