The oil seal would seal one face against a rotating member and the other face to a stationary housing. It would prevent dirt from coming between the hub or shaft and the seal.
As shown in Figure 1, sealing devices come in two types: contact and non-contact.Oil seals are among the major contact type sealing devices.