Resetting the pistons in your brake caliper is one of those tasks you will need to perform when fitting new brake pads or before bleeding the brake system.
Below is a picture of a Shimano Deore M596 brake caliper before the pistons were reset and after to show you the difference.
There are two ways to reset the position of your caliper pistons. The easiest way is with the brake pads in situ. Simply push a flat blade screwdriver in between the brake pads and twist. This will separate the brake pads and, in turn, push back the pistons to the reset position.
If you've already removed your brake pads, don't go through the trouble of putting them back in, reach for a plastic tyre lever and use it to push the pistons back into their housings.
Note: Never use sharp or metal objects to reset the position of the pistons as you may cause damage.
Now you've reset the position of the caliper pistons you can go ahead and insert your new brake pads or bleed block.