This video explains how we can generate constraints to solve the type inference problem. Constraints are generated through an algorithm that visits the syntax tree of the program. For each node in the tree, some kind of constraint is produced by this algorithm.