Causality and Generalizability: Identifiability and Learning Methods