Usually you can just push the pistons back into the calipers. Remove the wheel, remove the pads. Get some kind of tool suitable to prying, such as plastic tire levers or a wooden lever. Insert it between the pads. Push/pry slowly and firmly and the pistons should retract.
I've read that metal tools (e.g. screwdriver) are not recommended because they might scratch/chip the surface of the pistons. I don't know if this is an issue with metal pistons, but more likely to be a problem with ceramic pistons. Perhaps someone can correct me in a comment if I got this wrong.
I've done this with Avid Elixir 5 brakes. I don't know if all hydraulic brakes work this way.
I've had cases where this doesn't work, and the solution was to remove a small amount of brake fluid.