The proper way is to use a press with a die that put the force directly and uniformly on the race that is being pressed so no force is applied through the balls.
In the absence of a press and dies, the proper size wrench socket can be used, or a properly sized length of pipe or tubing, or you can make a die (I have a bunch that have been made for various purposes) and press the bearing using a vise or a dead blow hammer against the die. If using a hammer, hit just hard enough to move the bearing and don't let the die bounce.
Fit should usually be pressed for the part that rotates, and snug sliding for the stationary part to minimize the bearing walking. A good way to remember this is to think about roller blade wheels: The outer race is a press fit in the wheel, and rotates with it, while the non-rotating axle is a snug slide fit through the inner race.
Pressing a bearing INSIDE the rotating element is usually easier when you don't have the proper tooling, as the outer race is larger and you don't need to worry about it having a hole clear for the shaft to go into. Key thing for either is to start straight, as if you don't, it is easy to damage the bore or distort the bearing race.