The man is trying to train his dog to do specific actions and giving him treats for doing it.