Why do men and women have different earnings? What factors do affect the gender wage

Why do men and women have different earnings? What factors do affect the gender wage