The factory usually offers a special tool for this, but it's normally not needed.
Sealed bearings are normally a light press-fit into the hub, with a spacer inside, between the two bearings.
You need a long, slender drift punch. Put it through the center hole in one bearing, and push the spacer to one side, so you can hit the inner race of the other bearing. Then, push the spacer the other way and drive on the other edge of the inner race. Keep working like this, alternating side-to-side on one bearing until you drive one bearing out.
At this point, the bearing and spacer will fall out, and it's then very easy to flip the wheel over and drive out the remaining bearing (no spacer to deal with anymore).
When installing the new bearings, use a hammer and the old bearings as 'drivers' to drive the new ones in.. this way, you never have to strike the new bearings (which is very bad).