Thoroughly degrease a flat-tipped screwdriver with rubbing alcohol so it doesn't contaminate the brake-pad material, then insert it between the pads and rock it gently to push the pistons back. Now reinstall the wheel and pump the brake lever so the master cylinder can readjust the pads to the rotor.
If you still have rubbing:
1. confirm your rotor bolts or lockring are snug
2. check whether your rotor is significantly warped (sight through the pad-to-rotor gap while spinning the wheel and watch for rotor warp)
3. center the caliper on the rotor, which often can be done by loosening up the caliper bolts about 1/2 turn, then snugging them down while holding the brake lever to clamp the rotor between the pads.
Some brakes also have adjustments for free-stroke and pad contact, but you didn't mention what kind of brakes you have.