Ball bearings reduce friction by using smooth balls lubricated with oil or grease that freely roll between a smooth inner and outer surface. The main concept of the ball bearing is that objects that roll past each other produce less friction than if the objects were sliding against each other.
Ball bearings are typically mounted in rotating assemblies in which one race is stationary, such as the outer race when pressed into a housing, while the other race rotates with the shaft. The separation of the races by the balls reduces the friction that would've been present between the shaft and housing. The balls allow the inner race of the bearing to rotate independently of the outer race while also carrying the load transmitted through the races.