Simply put, sum types are unions and product types are structs.

Imagine we have two enums, Foo and Bar, a union Baz, and a struct Quux.

enum Foo { A, B };
enum Bar { X, Y, Z };

union Baz {
  enum Foo valueOne;
  enum Bar valueTwo;
};

struct Quux {
  enum Foo valueOne;
  enum Bar valueTwo;
};

How many possible values does Baz have? Since it’s a union, its two fields share the same memory, so only one of them can be set at a time. There are two values of Foo and three values of Bar, so there are a total of five different values that Baz could have–the sum of the number of potential values that each of its fields could have.

Quux, on the other hand, has memory for both of its fields, so valueOne could be one of two values, and valueTwo could be one of three, for a total of six distinct values that Quux could have–the product of the number of potential values that each of its field could have.