Baryon and lepton number violation in the Standard Model and beyond